/* Extracted from seo-analiz-php */

:root {
    --primary: #6c5ce7;
    --primary-hover: #5949db;
    --primary-light: #f2efff;
    --primary-rgb: 108, 92, 231;
    --sidebar-bg: #171926;
    --sidebar-bg-soft: #1f2334;
    --sidebar-hover: #262a41;
    --sidebar-text: #b0b8dd;
    --sidebar-active: rgba(108, 92, 231, 0.24);
    --bg-body: #f7f8fc;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-strong: #ffffff;
    --text-main: #171a2d;
    --text-muted: #667085;
    --text-soft: #98a2b3;
    --border: rgba(93, 87, 152, 0.14);
    --success: #10b981;
    --warning: #f59e0b;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 18px 40px -32px rgba(23, 26, 45, 0.35);
    --shadow-md: 0 28px 70px -42px rgba(31, 35, 74, 0.38);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    color: var(--text-main);
    background-color: var(--bg-body);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 260px;
    height: 100vh;
    padding: 24px 16px;
    color: var(--sidebar-text);
    background:
        radial-gradient(circle at top left, rgba(124, 110, 255, 0.16), transparent 28%),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-soft) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 18px 0 42px -34px rgba(0, 0, 0, 0.65);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 36px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-logo {
    display: block;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-logo--sidebar {
    width: 150px;
}

.brand-logo--mobile {
    width: 150px;
}

.brand-logo--footer {
    width: 91px;
}

/* Logo color classes (light/dark theme) */
.site-logo-text { fill: #1f2430; }
.site-logo-muted { fill: #9aa0a6; }
body.dark-theme .site-logo-text { fill: #e8e6ff; }
body.dark-theme .site-logo-muted { fill: #7a7890; }

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
    color: #fff;
    background-color: var(--sidebar-hover);
    border-color: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.nav-item.active {
    color: #fff;
    background: var(--primary);
    border-color: transparent;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.82;
}

.nav-item.active svg {
    opacity: 1;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.local-ai-card {
    padding: 16px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.6;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.local-ai-card h4 {
    color: #fff;
    font-size: 13px;
    margin-bottom: 8px;
}

.account-delete-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(248, 113, 113, 0.42);
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.account-delete-btn:hover:not(:disabled),
.account-delete-btn:focus-visible {
    background: rgba(220, 38, 38, 0.24);
    border-color: rgba(248, 113, 113, 0.72);
    color: #ffffff;
}

.account-delete-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.account-delete-btn--settings {
    width: auto;
    min-width: 168px;
    margin-top: 0;
    min-height: 42px;
}

.settings-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.settings-modal-actions-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

.settings-reset-btn,
.settings-save-btn {
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.settings-reset-btn {
    border: 1px solid var(--border);
    background: var(--bg-card-strong);
    color: var(--text-main);
}

.settings-save-btn {
    border: none;
    padding-inline: 20px;
    background: var(--primary);
    color: #fff;
}

.settings-reset-btn:hover,
.settings-reset-btn:focus-visible,
.settings-save-btn:hover,
.settings-save-btn:focus-visible {
    transform: translateY(-1px);
}

.settings-reset-btn:hover,
.settings-reset-btn:focus-visible {
    border-color: rgba(var(--primary-rgb), 0.34);
    color: var(--text-main);
}

.settings-save-btn:hover,
.settings-save-btn:focus-visible {
    filter: brightness(1.03);
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.site-language-switch {
    position: relative;
    display: block;
    margin: 0 8px 14px;
}

.site-language-switch summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    list-style: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-language-switch summary::-webkit-details-marker { display: none; }

.site-language-switch summary:hover,
.site-language-switch[open] summary {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.site-language-flag {
    display: inline-block;
    width: 18px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}
.site-language-flag--ru {
    background: linear-gradient(to bottom, #ffffff 0 33.33%, #2563eb 33.33% 66.66%, #ef4444 66.66% 100%);
}
.site-language-flag--en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Cpath fill='%23012169' d='M0 0h60v36H0z'/%3E%3Cpath stroke='%23fff' stroke-width='7' d='M0 0l60 36M60 0L0 36'/%3E%3Cpath stroke='%23C8102E' stroke-width='4' d='M0 0l60 36M60 0L0 36'/%3E%3Cpath stroke='%23fff' stroke-width='12' d='M30 0v36M0 18h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='7' d='M30 0v36M0 18h60'/%3E%3C/svg%3E");
}
.site-language-code { flex: 1; letter-spacing: 0.02em; }
.site-language-chevron { color: rgba(255, 255, 255, 0.62); transition: transform 0.2s ease; }
.site-language-switch[open] .site-language-chevron { transform: rotate(180deg); }

.site-language-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 30;
    display: grid;
    min-width: 142px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: #202538;
    box-shadow: 0 20px 42px -24px rgba(0, 0, 0, 0.72);
}

.site-language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 8px 9px;
    border-radius: 7px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.site-language-option:hover,
.site-language-option.is-active {
    color: #fff;
    background: rgba(var(--primary-rgb), 0.28);
}

.toggle-btn {
    position: relative;
    width: 38px;
    height: 22px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 5px;
    transition: transform 0.2s ease;
}

.toggle-btn.active {
    background: rgba(var(--primary-rgb), 0.72);
}

.toggle-btn.active::after {
    transform: translateX(16px);
}

.version {
    padding: 0 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.main-content {
    flex-grow: 1;
    min-height: 100vh;
    margin-left: 260px;
    width: calc(100vw - 260px);
    max-width: calc(100vw - 260px);
    padding: 34px 36px 48px;
    overflow-y: auto;
}

body[data-dashboard-view="cookie-banner"] .main-content {
    padding-top: 0;
    padding-right: 0;
    padding-left: 0;
}

body[data-dashboard-view="search-console"] .main-content {
    padding: 24px 20px 36px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.header-title {
    max-width: 820px;
}

.header-title h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-subtitle {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.badge-purple {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

.model-status {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    padding: 12px 16px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 10px;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08);
}

.model-status div strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.model-status div span {
    font-size: 12px;
    color: var(--text-muted);
}

.plan-status {
    position: relative;
    min-width: 278px;
    padding: 14px 14px 12px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 255, 0.96));
    border: 1px solid rgba(var(--primary-rgb), 0.16);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.plan-status[hidden] {
    display: none;
}

.plan-status::after {
    content: '';
    position: absolute;
    inset: auto 16px 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.62));
}

.plan-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.plan-status-head span,
.plan-status p,
.plan-status-metric-label {
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.35;
}

.plan-status-head span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.plan-status-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 999px;
}

.plan-status-quota {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.plan-status-metric {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 10px 11px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 12px;
}

.plan-status-metric strong {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.plan-quota-track {
    height: 6px;
    margin-top: 10px;
    overflow: hidden;
    background: rgba(var(--primary-rgb), 0.08);
    border-radius: 999px;
}

.plan-quota-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7a6dff);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.plan-status p {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    line-height: 1.4;
}

.plan-status[data-plan-key="pro"] .plan-status-head strong {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.2);
}

.plan-status[data-plan-key="pro_plus"] .plan-status-head strong {
    color: #9a3412;
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.22);
}

.plan-status[data-quota-state="low"] .plan-quota-track span {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.plan-status[data-quota-state="spent"] {
    border-color: rgba(239, 68, 68, 0.2);
}

.plan-status[data-quota-state="spent"] .plan-quota-track span {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.card {
    position: relative;
    padding: 32px;
    margin-bottom: 24px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.form-hint {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.url-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.url-mode-toggle[hidden] {
    display: none;
}

.url-mode-toggle-label {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
}

.url-mode-toggle-buttons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 10px;
}

.url-mode-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.url-mode-toggle-btn:hover,
.url-mode-toggle-btn:focus-visible {
    color: var(--text-main);
}

.url-mode-toggle-btn.is-active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 22px -16px rgba(var(--primary-rgb), 0.9);
}

.batch-url-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(260px, 1fr);
    gap: 16px;
    margin: 0 0 24px;
    padding: 16px;
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.batch-url-panel[hidden] {
    display: none;
}

.batch-url-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.batch-url-copy strong {
    font-size: 14px;
    color: var(--text-main);
}

.batch-url-copy span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.batch-url-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-url-label {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}

.batch-url-list {
    width: 100%;
    min-height: 104px;
    resize: vertical;
    padding: 12px 14px;
    color: var(--text-main);
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
}

.batch-url-list:focus {
    border-color: rgba(var(--primary-rgb), 0.38);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08);
}

.competitors-panel {
    grid-template-columns: 1fr;
    gap: 14px;
}

.competitors-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.competitors-panel-copy {
    display: flex;
    max-width: 680px;
    flex-direction: column;
    gap: 5px;
}

.competitors-panel-copy span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.competitors-panel-copy strong {
    color: var(--text-main);
    font-size: 16px;
}

.competitors-panel-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.competitors-readiness {
    flex-shrink: 0;
    max-width: 260px;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.competitors-readiness[data-state="ready"] {
    color: var(--success);
    background: #ecfdf5;
    border-color: #bbf7d0;
}

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

.competitors-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.competitors-step > span {
    grid-row: span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    background: #f4f4fb;
    border-radius: 50%;
}

.competitors-step strong {
    color: var(--text-main);
    font-size: 13px;
}

.competitors-step small {
    color: var(--text-muted);
    font-size: 12px;
}

.competitors-step[data-state="done"] {
    border-color: rgba(16, 185, 129, 0.35);
}

.competitors-step[data-state="done"] > span {
    color: #ffffff;
    background: var(--success);
}

.competitors-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.competitors-field-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

.competitors-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.competitors-count {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 7px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    background: #f4f4fb;
    border-radius: 999px;
}

.competitors-field-note {
    color: var(--text-muted);
    font-size: 12px;
}

.competitors-helper-card {
    padding: 12px 14px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.form-group {
    flex: 1;
}

.form-group.small {
    flex: 0 0 260px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 16px;
    width: 18px;
    color: var(--text-soft);
}

.form-control {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px 14px 44px;
    font-size: 14px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 3px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: rgba(var(--primary-rgb), 0.38);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.08);
}

select.form-control {
    padding-left: 16px;
    appearance: none;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.options-grid--grouped {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
}

.scenario-choice-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
}

.scenario-choice-group--wide {
    grid-column: span 2;
}

.scenario-choice-group-head {
    display: flex;
    min-height: 44px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 3px;
}

.scenario-choice-group-head strong {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.25;
}

.scenario-choice-group-head span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.scenario-choice-group-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.scenario-choice-group--wide .scenario-choice-group-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    padding: 20px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.24);
    box-shadow: var(--shadow-sm);
}

.option-card.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--text-muted);
    background: #f5f4fb;
    border-radius: 3px;
}

.option-card.active .option-icon {
    color: var(--primary);
    background: #fff;
}

.option-card h4 {
    margin-bottom: 8px;
    font-size: 15px;
}

.option-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.option-cost {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    margin-top: 12px;
    padding: 4px 8px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.option-cost--stepper {
    gap: 4px;
    padding: 3px 4px;
}

.option-cost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    background: transparent;
    border-radius: 6px;
    transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.option-cost-btn:hover:not(:disabled),
.option-cost-btn:focus-visible:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.12);
}

.option-cost-btn:disabled {
    opacity: 0.36;
    cursor: not-allowed;
}

.option-cost-value {
    min-width: 22px;
    text-align: center;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
}

.option-cost-note {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.option-card.is-locked,
.option-card.is-unavailable {
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.option-card.is-locked {
    opacity: 0.56;
    background: linear-gradient(180deg, rgba(248, 249, 255, 0.82), rgba(255, 255, 255, 0.94));
}

.option-card.is-unavailable {
    opacity: 0.72;
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.76), rgba(255, 255, 255, 0.94));
    border-color: rgba(245, 158, 11, 0.22);
}

.option-card.is-locked:hover,
.option-card.is-unavailable:hover {
    transform: none;
}

.option-card.is-locked .option-icon,
.option-card.is-unavailable .option-icon {
    background: rgba(148, 163, 184, 0.1);
}

.option-card.is-locked .option-cost {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.16);
}

.option-card.is-unavailable .option-cost {
    color: #b45309;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.18);
}

.option-card.is-locked.active,
.option-card.is-unavailable.active {
    border-color: rgba(var(--primary-rgb), 0.18);
}

.option-card.is-locked.active .option-check,
.option-card.is-unavailable.active .option-check {
    opacity: 0.22;
}

.option-check {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--primary);
    opacity: 0;
}

.option-card.active .option-check {
    opacity: 1;
}

.form-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-card-strong);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 5px;
    box-shadow: 0 18px 38px -30px rgba(15, 23, 42, 0.45);
}

.form-actions-main {
    display: grid;
    gap: 6px;
    margin-left: auto;
    justify-items: end;
}

.form-run-hint {
    max-width: 420px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

.form-run-hint[data-state="warn"] {
    color: #b42318;
}

.form-run-hint[data-state="info"] {
    color: var(--primary);
}

.run-button-placeholder {
    display: none;
}

.run-button-placeholder.is-active {
    display: block;
}

#run-analysis-btn.is-floating {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 80;
}

.form-actions-placeholder {
    display: none;
}

.form-actions-placeholder.is-active {
    display: block;
    margin-top: 24px;
}

.form-actions.has-floating-main {
    padding-bottom: calc(var(--floating-main-height, 0px) + 12px);
}

.form-actions.is-floating {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 80;
}

.form-actions-main.is-floating {
    position: fixed;
    right: auto;
    bottom: auto;
    z-index: 8;
}

.settings-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
}

.settings-panel[hidden] {
    display: none;
}

.google-search-panel {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 13px 14px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.google-search-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: auto;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.google-search-toggle svg {
    transition: transform 0.16s ease;
}

.google-search-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.google-search-panel-body {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
}

.google-search-panel-body[hidden] {
    display: none;
}

.google-search-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.google-search-controls,
.google-search-use-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.google-search-copy {
    display: grid;
    gap: 5px;
}

.google-search-copy span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.google-search-copy strong,
.google-search-data h4 {
    color: var(--text-main);
    font-size: 14px;
}

.google-search-copy p {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.google-search-actions,
.google-search-use-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.google-search-actions [hidden] {
    display: none !important;
}

.google-search-open-page {
    color: var(--text-main);
    text-decoration: none;
}

.google-search-connect {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.16);
    text-decoration: none;
}

.google-search-disconnect {
    color: #b42318;
}

.google-search-status {
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 5px;
}

.google-search-status[data-state="ok"] {
    color: #027a48;
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.18);
}

.google-search-status[data-state="error"] {
    color: #b42318;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
}

.google-search-controls[hidden],
.google-search-use-actions[hidden],
.google-search-data[hidden] {
    display: none;
}

.google-search-controls {
    justify-content: flex-start;
    padding-top: 2px;
}

.google-search-controls .form-control {
    max-width: 420px;
}

.google-search-load {
    min-height: 38px;
    padding: 0 16px;
}

.google-search-use-actions {
    justify-content: flex-start;
    padding-top: 2px;
}

.google-search-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.google-search-data section {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.google-search-list {
    display: grid;
    gap: 7px;
}

.google-search-item {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    background: var(--bg-card-strong);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 5px;
}

.google-search-item strong {
    overflow: hidden;
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.google-search-item span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.search-console-page {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.search-console-hero,
.search-console-toolbar,
.search-console-panel,
.search-console-empty,
.search-console-kpi,
.search-console-status,
.search-console-tabs {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-strong);
    box-shadow: var(--shadow-sm);
}

.search-console-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: stretch;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.96));
}

.search-console-hero-copy {
    display: grid;
    align-content: center;
    gap: 8px;
    min-width: 0;
}

.search-console-eyebrow {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-console-hero h1 {
    color: var(--text-main);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: 0;
}

.search-console-hero p {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.search-console-account {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
    padding: 18px;
    color: var(--text-main);
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 8px;
}

.search-console-account span,
.search-console-account small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.search-console-account strong {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
}

.search-console-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.search-console-field label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.search-console-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.search-console-actions [hidden] {
    display: none !important;
}

.search-console-actions .btn-settings,
.search-console-actions .btn-primary {
    min-height: 42px;
    white-space: nowrap;
}

#search-console-export[hidden] {
    display: none !important;
}

.search-console-connect {
    color: var(--primary);
    text-decoration: none;
}

.search-console-disconnect {
    color: #b42318;
}

.search-console-status {
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    box-shadow: none;
}

.search-console-status[data-state="ok"] {
    color: #027a48;
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.18);
}

.search-console-status[data-state="error"] {
    color: #b42318;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.18);
}

.search-console-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.search-console-kpi {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    box-shadow: none;
}

.search-console-kpi span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.search-console-kpi strong {
    color: var(--text-main);
    font-size: 24px;
    line-height: 1.1;
}

.search-console-bridge {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-strong);
    box-shadow: var(--shadow-sm);
}

.search-console-bridge-copy {
    display: grid;
    gap: 6px;
}

.search-console-bridge-copy strong {
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.3;
}

.search-console-bridge-copy p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.search-console-bridge-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.search-console-bridge-actions .btn-settings {
    min-height: 40px;
}

.search-console-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    box-shadow: none;
}

.search-console-tab {
    flex: 1 1 0;
    min-height: 40px;
    padding: 0 14px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.search-console-tab.is-active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.search-console-tab:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.search-console-content {
    display: grid;
    gap: 16px;
}

.search-console-overview-grid,
.search-console-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.search-console-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 18px;
    box-shadow: none;
}

.search-console-panel--tight {
    gap: 14px;
}

.search-console-section-head h2 {
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.3;
}

.search-console-opportunities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.search-console-opportunity {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 15px;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 8px;
}

.search-console-opportunity span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.search-console-opportunity strong {
    overflow: hidden;
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-opportunity p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.search-console-opportunity-action {
    justify-self: flex-start;
    min-height: 36px;
    padding: 0 14px;
}

.search-console-list {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    list-style: disc;
}

.search-console-list li {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.search-console-empty {
    display: grid;
    gap: 8px;
    padding: 22px;
    text-align: center;
    box-shadow: none;
}

.search-console-empty--compact {
    padding: 14px;
    text-align: left;
}

.search-console-empty strong {
    color: var(--text-main);
    font-size: 15px;
}

.search-console-empty p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.search-console-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.search-console-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.search-console-table--compact {
    min-width: 560px;
}

.search-console-table th,
.search-console-table td {
    padding: 11px 12px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.search-console-table th {
    color: var(--text-main);
    font-weight: 800;
    background: rgba(var(--primary-rgb), 0.04);
}

.search-console-table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.search-console-table-sort:hover,
.search-console-table-sort:focus-visible {
    color: var(--primary);
    outline: none;
}

.search-console-table-sort-label {
    min-width: 0;
}

.search-console-table-sort-icon {
    flex-shrink: 0;
    color: var(--text-soft);
    font-size: 11px;
}

.search-console-table-sort.is-active .search-console-table-sort-icon {
    color: var(--primary);
}

.search-console-table-actions-col,
.search-console-table-actions {
    width: 56px;
    text-align: center;
}

.search-console-table-metric-col,
.search-console-table-metric,
.search-console-table-change-col,
.search-console-table-change {
    white-space: nowrap;
    width: 1%;
}

.search-console-table-status-col,
.search-console-table-status {
    width: 208px;
}

.search-console-table-actions {
    white-space: nowrap;
    padding-left: 8px;
    padding-right: 8px;
}

.search-console-table td:first-child {
    max-width: 320px;
    color: var(--text-main);
    font-weight: 600;
}

.search-console-table td:first-child span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-table tr:last-child td {
    border-bottom: 0;
}

.search-console-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.search-console-pagination-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--text-soft);
    font-size: 12px;
}

.search-console-pagination-copy strong {
    color: var(--text-main);
    font-size: 13px;
}

.search-console-pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.search-console-pagination-btn {
    min-width: 38px;
    padding: 8px 11px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.search-console-pagination-btn:hover,
.search-console-pagination-btn:focus-visible {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.28);
    outline: none;
}

.search-console-pagination-btn.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.search-console-pagination-btn:disabled {
    opacity: 0.52;
    cursor: default;
}

.search-console-pagination-ellipsis {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.search-console-row-action {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .search-console-toolbar {
        grid-template-columns: minmax(0, 1fr) 160px;
    }

    .search-console-bridge {
        grid-template-columns: 1fr;
    }

    .search-console-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .search-console-bridge-actions {
        justify-content: flex-start;
    }

    .search-console-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .search-console-opportunities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .search-console-hero,
    .search-console-toolbar,
    .search-console-overview-grid,
    .search-console-split {
        grid-template-columns: 1fr;
    }

    .search-console-hero {
        padding: 18px;
    }

    .search-console-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-console-opportunities {
        grid-template-columns: 1fr;
    }

    .search-console-tabs {
        overflow-x: auto;
    }

    .search-console-tab {
        min-width: 120px;
    }
}

@media (max-width: 520px) {
    .search-console-actions .btn-settings,
    .search-console-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .search-console-bridge-actions .btn-settings {
        width: 100%;
        justify-content: center;
    }

    .search-console-kpis {
        grid-template-columns: 1fr;
    }

    .search-console-table {
        min-width: 560px;
    }
}

/* Search Console dashboard refresh */
.search-console-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    padding: 18px 20px;
    background: var(--bg-card-strong);
}

.search-console-hero h1 {
    font-size: 30px;
    line-height: 1.15;
}

.search-console-hero p {
    max-width: 820px;
    font-size: 14px;
}

.search-console-account {
    padding: 14px;
    background: rgba(14, 165, 233, 0.07);
    border-color: rgba(14, 165, 233, 0.18);
}

.search-console-toolbar {
    grid-template-columns: minmax(260px, 1fr) 140px auto;
    padding: 14px;
}

.search-console-kpis {
    gap: 10px;
}

.search-console-kpi {
    padding: 13px 14px;
}

.search-console-kpi strong {
    font-size: 21px;
}

.search-console-chart-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card-strong);
    box-shadow: var(--shadow-soft);
}

.search-console-chart-head {
    align-items: start;
}

.search-console-chart-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.search-console-chart-head h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.25;
}

.search-console-chart-head p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.search-console-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.search-console-chart-legend span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.search-console-chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.search-console-chart-legend .is-clicks { background: #1a73e8; }
.search-console-chart-legend .is-impressions { background: #4338ca; }

.search-console-chart-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.search-console-chart-card {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 7px;
    background: rgba(248, 250, 252, 0.7);
}

.search-console-chart-card span,
.search-console-chart-card small {
    color: var(--text-muted);
    font-size: 12px;
}

.search-console-chart-card strong {
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.1;
}

.search-console-delta,
.search-console-change {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
}

.search-console-delta.is-up,
.search-console-change.is-up {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.search-console-delta.is-down,
.search-console-change.is-down {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.search-console-delta.is-flat,
.search-console-change.is-flat {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.14);
}

.search-console-line-chart {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 44px;
    gap: 10px;
    min-height: 292px;
    align-items: stretch;
}

.search-console-chart-stage {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.1), transparent 34%),
        radial-gradient(circle at top right, rgba(67, 56, 202, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-console-line-chart svg {
    display: block;
    width: 100%;
    height: 260px;
    overflow: visible;
}

.search-console-y-axis {
    display: grid;
    align-content: space-between;
    height: 260px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    padding: 3px 0 14px;
}

.search-console-y-axis.is-clicks {
    color: #1a73e8;
    text-align: right;
}

.search-console-y-axis.is-impressions {
    color: #4338ca;
}

.search-console-grid-line {
    fill: none;
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 1;
    stroke-dasharray: 4 8;
}

.search-console-area {
    stroke: none;
    pointer-events: none;
}

.search-console-area.is-clicks {
    fill: url(#search-console-fill-clicks);
}

.search-console-area.is-impressions {
    fill: url(#search-console-fill-impressions);
}

.search-console-line {
    fill: none;
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

.search-console-line.is-clicks { stroke: #1a73e8; }

.search-console-line.is-impressions {
    stroke: #4338ca;
    opacity: 0.94;
}

.search-console-point {
    opacity: 0;
    transition: opacity 0.16s ease;
}

.search-console-point.is-clicks {
    fill: #fff;
    stroke: #1a73e8;
    stroke-width: 2.3;
}

.search-console-point.is-impressions {
    fill: #fff;
    stroke: #4338ca;
    stroke-width: 2;
}

.search-console-point.is-active {
    opacity: 1;
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.16));
}

.search-console-chart-guide {
    stroke: rgba(15, 23, 42, 0.2);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    opacity: 0;
    transition: opacity 0.16s ease;
    pointer-events: none;
}

.search-console-chart-guide.is-visible {
    opacity: 1;
}

.search-console-chart-hit {
    fill: transparent;
    cursor: crosshair;
    outline: none;
}

.search-console-chart-hit:focus-visible {
    fill: rgba(26, 115, 232, 0.06);
}

.search-console-chart-tooltip {
    position: absolute;
    z-index: 3;
    display: grid;
    gap: 6px;
    min-width: 182px;
    padding: 12px 14px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    box-shadow: 0 24px 48px -30px rgba(15, 23, 42, 0.38);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.search-console-chart-tooltip[hidden] {
    display: none;
}

.search-console-chart-tooltip strong {
    font-size: 13px;
    font-weight: 700;
}

.search-console-chart-tooltip span {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
}

.search-console-chart-tooltip i {
    display: inline-block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.search-console-chart-tooltip .is-clicks { background: #1a73e8; }
.search-console-chart-tooltip .is-impressions { background: #4338ca; }

.search-console-chart-axis {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 4px 0;
}

.search-console-chart-empty {
    display: grid;
    gap: 4px;
    min-height: 120px;
    align-content: center;
    color: var(--text-muted);
}

.search-console-chart-empty strong {
    color: var(--text-main);
}

.search-console-trend-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.search-console-trend-panel,
.search-console-country-list {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.search-console-trend-panel {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(var(--primary-rgb), 0.035);
}

.search-console-trend-panel h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 14px;
}

.search-console-trend-list {
    display: grid;
    gap: 8px;
}

.search-console-trend-row,
.search-console-country-row {
    display: grid;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.search-console-trend-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.search-console-trend-row span:first-child,
.search-console-country-row span {
    overflow: hidden;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-trend-row strong,
.search-console-country-row strong {
    color: var(--text-main);
    font-size: 12px;
}

.search-console-ai-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.08);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    flex: 0 0 auto;
}

.search-console-ai-mini--round {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 50%;
}

.search-console-ai-mini:hover,
.search-console-ai-mini:focus-visible {
    border-color: rgba(37, 99, 235, 0.42);
    background: rgba(37, 99, 235, 0.14);
}

.search-console-ai-mini.is-loading {
    min-width: 38px;
    cursor: wait;
}

.search-console-button-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-top-color: #1d4ed8;
    border-radius: 50%;
    animation: search-console-spin 0.72s linear infinite;
}

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

.search-console-country-row {
    grid-template-columns: minmax(132px, 188px) minmax(0, 1fr) auto;
}

.search-console-country-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.search-console-country-flag {
    flex: 0 0 16px;
    width: 16px;
    height: 11px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.search-console-country-flag.flag {
    margin-top: 1px;
}

.search-console-country-flag--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    box-shadow: none;
}

.search-console-country-label {
    min-width: 0;
}

.search-console-country-track {
    overflow: hidden;
    height: 8px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
}

.search-console-country-track i {
    display: block;
    height: 100%;
    background: #0ea5e9;
    border-radius: inherit;
}

.search-console-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.search-console-ai-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.search-console-ai-modal[hidden] {
    display: none;
}

.search-console-ai-modal-box {
    position: relative;
    display: grid;
    gap: 14px;
    width: min(520px, 100%);
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: var(--bg-card-strong);
    box-shadow: 0 30px 90px -52px rgba(15, 23, 42, 0.72);
}

.search-console-ai-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    border-radius: 50%;
}

.search-console-ai-modal-close:hover,
.search-console-ai-modal-close:focus-visible {
    background: rgba(148, 163, 184, 0.14);
}

.search-console-ai-modal-badge {
    width: max-content;
    max-width: 100%;
    padding: 4px 9px;
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.search-console-ai-modal h3 {
    margin: 0;
    padding-right: 28px;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.25;
}

.search-console-ai-modal-section {
    display: grid;
    gap: 5px;
}

.search-console-ai-modal-section span {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
}

.search-console-ai-modal-section p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.search-console-ai-modal .btn-primary {
    justify-self: start;
}

.search-console-panel--wide {
    gap: 14px;
}

.search-console-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.search-console-bars-block {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.search-console-bars-block h3 {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.3;
}

.search-console-bars {
    display: grid;
    gap: 10px;
}

.search-console-bar-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.4fr) minmax(110px, 2fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.search-console-bar-row span {
    overflow: hidden;
    color: var(--text-main);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-bar-row strong {
    color: var(--text-main);
    font-size: 12px;
}

.search-console-bar-track,
.search-console-check-track {
    overflow: hidden;
    height: 7px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
}

.search-console-bar-track i,
.search-console-check-track i {
    display: block;
    height: 100%;
    background: #2563eb;
    border-radius: inherit;
}

.search-console-checks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.search-console-overview-grid .search-console-checks,
.search-console-panel .search-console-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-console-panel--tight > .search-console-checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.search-console-check {
    display: grid;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(248, 250, 252, 0.72);
}

.search-console-check-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.search-console-check-head span {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
}

.search-console-check-head strong {
    color: var(--text-main);
    font-size: 20px;
    line-height: 1;
}

.search-console-check p,
.search-console-check-examples {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.search-console-check-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.search-console-check-examples b {
    color: var(--text-main);
}

.search-console-check-examples span {
    max-width: 100%;
    overflow: hidden;
    padding: 2px 7px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-check.is-danger .search-console-check-track i,
.search-console-status-chip.is-danger {
    background: #ef4444;
}

.search-console-check.is-warning .search-console-check-track i,
.search-console-status-chip.is-warning {
    background: #f59e0b;
}

.search-console-check.is-info .search-console-check-track i,
.search-console-status-chip.is-info {
    background: #0ea5e9;
}

.search-console-check.is-success .search-console-check-track i,
.search-console-status-chip.is-success {
    background: #10b981;
}

.search-console-status-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.search-console-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
}

.search-console-table--compact th,
.search-console-table--compact td {
    padding: 9px 10px;
}

.search-console-group-list {
    display: grid;
    gap: 9px;
}

.search-console-group-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(var(--primary-rgb), 0.035);
}

.search-console-group-item strong,
.search-console-group-item p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-console-group-item strong {
    color: var(--text-main);
    font-size: 13px;
}

.search-console-group-item span,
.search-console-group-item p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.search-console-opportunity {
    align-content: start;
}

@media (max-width: 1180px) {
    .search-console-toolbar {
        grid-template-columns: minmax(0, 1fr) 140px;
    }

    .search-console-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .search-console-chart-grid,
    .search-console-chart-cards,
    .search-console-trend-grid,
    .search-console-panel--tight > .search-console-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .search-console-hero,
    .search-console-toolbar {
        grid-template-columns: 1fr;
    }

    .search-console-hero {
        padding: 16px;
    }

    .search-console-chart-grid,
    .search-console-chart-cards,
    .search-console-trend-grid,
    .search-console-checks,
    .search-console-overview-grid .search-console-checks,
    .search-console-panel .search-console-checks,
    .search-console-panel--tight > .search-console-checks {
        grid-template-columns: 1fr;
    }

    .search-console-bar-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .search-console-bar-track {
        grid-column: 1 / -1;
        order: 3;
    }

    .search-console-chart-head {
        display: grid;
        justify-content: stretch;
    }

    .search-console-line-chart,
    .search-console-line-chart svg,
    .search-console-y-axis {
        min-height: 0;
        height: 210px;
    }

    .search-console-line-chart {
        grid-template-columns: 34px minmax(0, 1fr) 38px;
    }

    .search-console-line-chart svg {
        height: 190px;
    }

    .search-console-trend-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .search-console-trend-row .search-console-change,
    .search-console-trend-row .search-console-ai-mini {
        justify-self: start;
    }
}

.setting-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.setting-option input {
    margin-top: 2px;
    accent-color: var(--primary);
}

.setting-option strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-main);
}

.setting-option span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.btn-settings {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-settings:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.04);
    border-color: rgba(var(--primary-rgb), 0.12);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, #7a6dff 100%);
    border-radius: 5px;
    box-shadow: 0 18px 36px -22px rgba(var(--primary-rgb), 0.85);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #6f63ff 100%);
    transform: translateY(-1px);
}

.info-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    margin-bottom: 40px;
    background: linear-gradient(to right, #f8f7ff, #ffffff);
    border: 1px solid var(--primary-light);
    border-radius: 9px;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    color: var(--primary);
    background: #e0e7ff;
    border-radius: 5px;
}

.info-content {
    flex-grow: 1;
}

.info-content h4 {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.4;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.info-list svg {
    color: var(--primary);
    flex-shrink: 0;
}

.info-banner > div:last-child {
    flex-shrink: 0;
}

.info-banner > div:last-child svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.results-wrapper {
    margin-top: 8px;
}

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

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.export-format-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.export-format-select {
    min-height: 40px;
    padding: 8px 32px 8px 12px;
    color: var(--text-main);
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.batch-report-switcher {
    display: flex;
    gap: 8px;
    margin: -8px 0 20px;
    padding-bottom: 4px;
    overflow-x: auto;
}

.batch-report-switcher[hidden] {
    display: none;
}

.batch-report-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    max-width: 260px;
    min-height: 38px;
    padding: 8px 12px;
    color: var(--text-muted);
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.batch-report-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-report-tab.is-active {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.08);
}

.batch-report-tab.is-pending::after {
    content: '';
    width: 8px;
    height: 8px;
    border: 2px solid rgba(var(--primary-rgb), 0.22);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin-ring 0.8s linear infinite;
}

.history-status-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.history-status-spinner {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border: 2px solid rgba(var(--primary-rgb), 0.22);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin-ring 0.8s linear infinite;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.scores-grid[hidden] {
    display: none !important;
}

.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    text-align: center;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.score-card h5 {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
}

.circular-chart {
    display: block;
    position: relative;
    max-width: 84px;
    max-height: 84px;
    margin: 0 auto 16px;
}

.circle-bg {
    fill: none;
    stroke: #eef0f7;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
}

.percentage {
    fill: var(--text-main);
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
}

.percentage-small {
    fill: var(--text-muted);
    font-size: 5px;
    font-weight: 500;
    text-anchor: middle;
}

.score-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 20%;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.analysis-panel {
    padding: 24px;
    margin-bottom: 24px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.analysis-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.analysis-panel-header h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.analysis-panel-header p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-muted);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.analysis-points {
    display: grid;
    gap: 12px;
}

.analysis-point {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #fbfcff;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.first-steps-section {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.first-steps-section[hidden] {
    display: none !important;
}

.first-steps-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.first-steps-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.first-steps-head p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.first-steps-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.first-step-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.first-step-card strong {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.35;
}

.first-step-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.first-step-priority {
    justify-self: start;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.first-step-priority.high {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.first-step-priority.medium {
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
}

.first-step-priority.low {
    color: #166534;
    background: rgba(34, 197, 94, 0.1);
}

.analysis-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.analysis-point p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.analysis-panel[data-layout="content"] .analysis-points {
    display: grid;
    gap: 11px;
}

.analysis-panel[data-layout="content"] .analysis-point {
    display: block;
    border-left: 3px solid var(--primary);
}

.analysis-panel[data-layout="technical"] .analysis-points {
    display: grid;
    gap: 10px;
}

.analysis-panel[data-layout="technical"] .analysis-point {
    align-items: flex-start;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.06), var(--bg-card));
}

.analysis-panel[data-layout="plan"] {
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.04), var(--bg-card-strong));
}

.plan-roadmap {
    display: grid;
    gap: 18px;
}

.plan-next-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card-strong);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
}

.plan-next-panel h4 {
    margin: 0;
    font-size: 14px;
}

.plan-next-panel p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.plan-next-list {
    display: grid;
    gap: 7px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
}

.plan-next-list li {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;
}

.plan-next-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
}

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

.plan-next-actions button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-card);
}

.plan-next-actions button:first-child {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.plan-step {
    position: relative;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 16px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.plan-step-index {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    background: var(--primary);
    border-radius: 50%;
}

.plan-step-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.plan-step-head h4 {
    font-size: 15px;
    line-height: 1.35;
}

.plan-step-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.plan-step-chip {
    min-height: 26px;
    padding: 4px 9px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    background: rgba(var(--primary-rgb), 0.06);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 999px;
}

.plan-subsections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.plan-subsection {
    padding: 14px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
}

.plan-subsection strong {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
}

.plan-subsection p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* === SEO Audit Report (Plan scenario) === */
.seo-audit-report {
    display: grid;
    gap: 18px;
}

.audit-report-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text);
}

.audit-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.audit-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.audit-section--strengths .audit-section-header {
    background: rgba(34, 197, 94, 0.09);
    color: #15803d;
}

.audit-section--weaknesses .audit-section-header {
    background: rgba(239, 68, 68, 0.09);
    color: #b91c1c;
}

.audit-section--technical .audit-section-header {
    background: rgba(59, 130, 246, 0.09);
    color: #1d4ed8;
}

.audit-section--summary .audit-section-header {
    background: rgba(var(--primary-rgb), 0.09);
    color: var(--primary);
}

.audit-section--score .audit-section-header,
.audit-section--categories .audit-section-header,
.audit-section--roadmap-deep .audit-section-header {
    background: rgba(var(--primary-rgb), 0.09);
    color: var(--primary);
}

.audit-section--coverage .audit-section-header {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
}

.audit-section--content-gaps .audit-section-header {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.audit-section--quickwins .audit-section-header {
    background: rgba(34, 197, 94, 0.08);
    color: #15803d;
}

.audit-section--metrics .audit-section-header {
    background: rgba(15, 118, 110, 0.09);
    color: #0f766e;
}

.audit-score-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.audit-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.16), rgba(var(--primary-rgb), 0.08));
    color: var(--text-main);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.audit-score-copy {
    display: grid;
    gap: 6px;
}

.audit-score-verdict {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

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

.audit-fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
}

.audit-fact-card {
    display: grid;
    gap: 6px;
    min-height: 86px;
    padding: 12px 13px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.audit-fact-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-muted);
}

.audit-fact-value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.audit-category-card {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.audit-category-score {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.audit-category-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.audit-coverage-meta {
    padding: 0 16px 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.audit-inline-link {
    color: var(--accent-blue);
    word-break: break-all;
}

.audit-bullet-list {
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 8px;
}

.audit-bullet-list li {
    color: var(--text-main);
    font-size: 12.5px;
    line-height: 1.6;
}

.audit-roadmap-grid {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.audit-roadmap-phase {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.audit-roadmap-phase-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.audit-roadmap-phase-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.audit-roadmap-meta {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.audit-roadmap-actions {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.audit-roadmap-actions li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 11px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.audit-roadmap-actions span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.audit-roadmap-actions div {
    color: var(--text-main);
    font-size: 12.5px;
    line-height: 1.6;
}

.audit-roadmap-extras,
.audit-roadmap-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.audit-roadmap-extra {
    display: grid;
    gap: 7px;
    padding: 11px 12px;
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 8px;
}

.audit-roadmap-extra strong {
    color: var(--primary);
    font-size: 12px;
}

.audit-roadmap-extra ul {
    display: grid;
    gap: 6px;
    padding-left: 18px;
    margin: 0;
}

.audit-roadmap-extra li {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.audit-roadmap-meta-grid .audit-roadmap-meta {
    padding: 10px 11px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.audit-item {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}

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

.audit-item-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.audit-item-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.audit-weakness-problem {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 7px;
}

.audit-weakness-rec {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text);
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary);
    padding: 7px 11px;
    border-radius: 0 4px 4px 0;
}

.audit-weakness-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
}

.audit-summary-text {
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text);
}

/* === Page stats strip (shown at top of each scenario panel) === */
.page-stats-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 6px;
    grid-column: 1 / -1;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    white-space: nowrap;
    color: var(--text);
}

.stats-item-icon {
    font-size: 12px;
    line-height: 1;
}

.stats-item.ok { border-color: #a7f3d0; color: #047857; background: #ecfdf5; }
.stats-item.warn { border-color: #fde68a; color: #b45309; background: #fffbeb; }
.stats-item.bad { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }

/* === General scenario: numbered insight cards === */
.insight-cards {
    display: grid;
    gap: 11px;
}

.insight-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
    border-left-width: 4px;
    background: var(--bg-card);
}

.insight-card-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    margin-top: 1px;
}

.insight-card-body {
    flex: 1;
    min-width: 0;
}

.insight-card-body strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.insight-card-body p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.insight-card--danger { border-left-color: #ef4444; }
.insight-card--danger .insight-card-num { background: #ef4444; }
.insight-card--info { border-left-color: #3b82f6; }
.insight-card--info .insight-card-num { background: #3b82f6; }
.insight-card--success { border-left-color: #22c55e; }
.insight-card--success .insight-card-num { background: #22c55e; }
.insight-card--warning { border-left-color: #f59e0b; }
.insight-card--warning .insight-card-num { background: #f59e0b; }

/* === Content scenario: editorial card grid === */
.content-cards {
    display: grid;
    gap: 11px;
}

.content-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top-width: 3px;
}

.content-card-tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 999px;
}

.content-card strong {
    font-size: 13px;
    line-height: 1.4;
    display: block;
}

.content-card p {
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

.content-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.content-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.content-dot.high { background: #ef4444; }
.content-dot.medium { background: #f59e0b; }
.content-dot.low { background: #22c55e; }

.content-tab-issues .content-card { border-top-color: #6366f1; }
.content-tab-issues .content-card-tag { background: rgba(99,102,241,0.1); color: #4338ca; }
.content-tab-recommendations .content-card { border-top-color: #8b5cf6; }
.content-tab-recommendations .content-card-tag { background: rgba(139,92,246,0.1); color: #7c3aed; }
.content-tab-priorities .content-card { border-top-color: #f59e0b; }
.content-tab-priorities .content-card-tag { background: rgba(245,158,11,0.1); color: #b45309; }

/* === Technical scenario: status checklist === */
.tech-list {
    display: grid;
    gap: 8px;
}

.tech-item {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.tech-status-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
    letter-spacing: 0;
}

.tech-status-icon.high {
    background: rgba(239,68,68,0.12);
    color: #dc2626;
}

.tech-status-icon.medium {
    background: rgba(245,158,11,0.12);
    color: #d97706;
}

.tech-status-icon.low {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

.tech-item-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    margin-bottom: 4px;
    color: var(--text);
}

.tech-item-desc {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.insight-specifics {
    display: grid;
    gap: 6px;
    margin: 9px 0 4px;
}

.insight-specifics div {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    background: rgba(var(--primary-rgb), 0.035);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 6px;
}

.insight-specifics span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.insight-specifics strong {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.resource-weight-panel {
    display: grid;
    gap: 14px;
}

.resource-weight-head {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-weight-head h3 {
    margin: 3px 0 6px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.3;
}

.resource-weight-head p {
    max-width: 680px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.resource-weight-eyebrow {
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.resource-weight-total {
    display: grid;
    align-content: center;
    min-width: 150px;
    padding: 12px 14px;
    text-align: right;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbff;
}

.resource-weight-total span,
.resource-weight-total small,
.resource-weight-bucket span,
.resource-weight-bucket small {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.resource-weight-total strong,
.resource-weight-bucket strong {
    color: var(--text-main);
    font-size: 22px;
    line-height: 1.15;
}

.resource-weight-total.bad { border-color: #fecaca; background: #fef2f2; }
.resource-weight-total.warn { border-color: #fde68a; background: #fffbeb; }
.resource-weight-total.ok { border-color: #a7f3d0; background: #ecfdf5; }

.resource-weight-buckets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.resource-weight-bucket {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-weight-bucket--css { border-left: 4px solid #3b82f6; }
.resource-weight-bucket--js { border-left: 4px solid #f59e0b; }

.resource-weight-table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-weight-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 12px;
}

.resource-weight-table th,
.resource-weight-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.resource-weight-table th {
    color: var(--text-muted);
    background: #f8fafc;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.resource-weight-table tr:last-child td {
    border-bottom: 0;
}

.resource-file-name {
    display: block;
    max-width: 280px;
    overflow: hidden;
    color: var(--text-main);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-weight-actions {
    display: grid;
    gap: 8px;
}

.resource-weight-action,
.resource-weight-note {
    margin: 0;
    padding: 11px 13px;
    color: var(--text-muted);
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12.5px;
    line-height: 1.55;
}

.resource-unused-details {
    display: grid;
    gap: 9px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-unused-details-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.resource-unused-details-head strong {
    color: var(--text-main);
    font-size: 13px;
}

.resource-unused-details-head span {
    max-width: 420px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

.resource-unused-detail-list {
    display: grid;
    gap: 6px;
}

.resource-unused-detail-row {
    display: grid;
    grid-template-columns: minmax(110px, 1.2fr) 48px 70px minmax(160px, 2fr) 74px;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 11.5px;
}

.resource-unused-file {
    overflow: hidden;
    color: var(--text-main);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-unused-detail-row code {
    overflow: hidden;
    padding: 3px 5px;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.04);
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-unused-detail-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.resource-unused-detail-meta {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-load-unused-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.resource-analysis-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 8px;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.07);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.resource-analysis-btn:hover,
.resource-analysis-btn:focus-visible {
    background: rgba(var(--primary-rgb), 0.12);
}

.resource-analysis-btn .db-spinner {
    display: none;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(var(--primary-rgb), 0.22);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: db-spin 0.65s linear infinite;
}

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

.resource-analysis-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.48);
}

.resource-analysis-modal.show {
    display: flex;
}

.resource-analysis-modal[hidden] {
    display: none;
}

.resource-analysis-modal-box {
    position: relative;
    display: grid;
    gap: 14px;
    width: min(960px, 100%);
    max-height: min(820px, calc(100vh - 44px));
    overflow: auto;
    padding: 18px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.resource-analysis-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.resource-analysis-modal-head h3 {
    margin: 4px 36px 5px 0;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.35;
}

.resource-analysis-modal-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.resource-analysis-modal-body {
    display: grid;
    gap: 12px;
}

.resource-analysis-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.resource-analysis-facts span {
    padding: 5px 8px;
    color: var(--text-main);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
}

.resource-analysis-ai {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.resource-analysis-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.resource-weight-panel--empty .resource-weight-head {
    background: #fafbff;
}

.resource-load-panel {
    display: grid;
    gap: 14px;
}

.resource-load-head {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-load-head h3 {
    margin: 3px 0 6px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.3;
}

.resource-load-head p {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.resource-load-verdict {
    display: grid;
    align-content: center;
    min-width: 220px;
    max-width: 340px;
    padding: 12px 14px;
    background: #fafbff;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-load-verdict span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.resource-load-verdict strong {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.45;
}

.resource-load-verdict.high { border-color: #fecaca; background: #fef2f2; }
.resource-load-verdict.medium { border-color: #fde68a; background: #fffbeb; }
.resource-load-verdict.low { border-color: #a7f3d0; background: #ecfdf5; }

.resource-load-kpis,
.resource-load-score-grid,
.resource-load-group-grid,
.resource-load-path-grid,
.resource-code-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.resource-load-kpi,
.resource-load-score-card,
.resource-load-group,
.resource-load-card,
.resource-load-path-card,
.resource-code-summary-card {
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-load-kpi span,
.resource-load-score-card span,
.resource-load-group span,
.resource-code-summary-card dt {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.resource-load-kpi strong,
.resource-load-score-card strong,
.resource-load-group strong {
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.15;
}

.resource-load-score-card small {
    color: var(--text-muted);
    font-size: 12px;
}

.resource-load-score-card p,
.resource-load-group small,
.resource-load-card p,
.resource-load-card small,
.resource-load-path-card li {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.resource-load-kpi.bad { border-color: #fecaca; background: #fef2f2; }
.resource-load-kpi.warn { border-color: #fde68a; background: #fffbeb; }
.resource-load-kpi.ok { border-color: #a7f3d0; background: #ecfdf5; }

.resource-load-table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.resource-load-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-size: 12px;
}

.resource-load-table--coverage {
    min-width: 1320px;
}

.resource-load-table th,
.resource-load-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.resource-load-table th {
    color: var(--text-muted);
    background: #f8fafc;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.resource-load-table tr:last-child td {
    border-bottom: 0;
}

.resource-load-file {
    display: block;
    max-width: 320px;
    overflow: hidden;
    color: var(--text-main);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-load-tag {
    display: inline-flex;
    margin: 0 5px 5px 0;
    padding: 4px 7px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.resource-load-mini {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.resource-load-mini.ok {
    background: #ecfdf5;
    color: #047857;
}

.resource-load-mini.warn {
    background: #fffbeb;
    color: #b45309;
}

.resource-load-mini.bad {
    background: #fef2f2;
    color: #b42318;
}

.resource-load-path-card h4,
.resource-code-summary-card h4 {
    margin: 0 0 4px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.35;
}

.resource-load-path-card ul,
.resource-code-summary-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.resource-load-path-card li,
.resource-code-summary-card dl div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.resource-load-path-card li {
    list-style: none;
}

.resource-load-path-card li span {
    overflow: hidden;
    color: var(--text-main);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-load-path-card li strong,
.resource-code-summary-card dd {
    margin: 0;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.resource-code-section .resource-code-summary-card {
    width: min(420px, 100%);
}

.resource-code-summary-card dl div {
    grid-template-columns: max-content auto;
    justify-content: start;
    gap: 14px;
}

.resource-load-subtitle {
    margin: 4px 0 0;
    color: var(--text-main);
    font-size: 14px;
}

.resource-code-stack,
.resource-code-section {
    display: grid;
    gap: 12px;
}

.resource-load-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.resource-load-card-list,
.resource-load-fixes {
    display: grid;
    gap: 10px;
}

.resource-load-card strong {
    color: var(--text-main);
    font-size: 13px;
}

@media (max-width: 820px) {
    .resource-load-head,
    .resource-weight-head {
        flex-direction: column;
    }

    .resource-load-verdict {
        max-width: none;
    }

    .resource-load-split {
        grid-template-columns: 1fr;
    }
}

.point-priority {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    border: 1px solid transparent;
}

.point-priority.high {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.point-priority.medium {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.point-priority.low {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.preview-wrapper {
    margin-bottom: 40px;
}

.preview-wrapper h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.preview-card {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.preview-image {
    flex-shrink: 0;
    width: 520px;
    max-width: 100%;
    min-height: 280px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.preview-screenshots {
    --shot-height: clamp(320px, 36vw, 430px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: stretch;
    min-height: calc(var(--shot-height) + 24px);
    padding: 12px;
}

.preview-shot {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    position: relative;
    min-width: 0;
    height: var(--shot-height);
    margin: 0;
    overflow: hidden;
    padding: 10px;
    background: linear-gradient(180deg, #e8eef8 0%, #dfe7f2 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 5px;
}

.preview-shot figcaption,
.visual-shot figcaption {
    position: static;
    z-index: auto;
    justify-self: start;
    padding: 4px 8px;
    color: #fff;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.preview-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 4px;
}

.preview-shot--desktop {
    aspect-ratio: auto;
}

.preview-shot--mobile {
    aspect-ratio: auto;
}

.preview-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 18px;
    line-height: 1.4;
    word-break: break-word;
}

.preview-info p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.preview-info .meta {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

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

.data-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 12px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.data-badge.success {
    color: var(--success);
    background: #ecfdf5;
    border-color: #d1fae5;
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
    margin-bottom: 48px;
}

.faq-grid > div:first-child,
.faq-grid > div:last-child {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.faq-item {
    display: block;
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.faq-answer {
    display: none;
    padding-top: 12px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}
.faq-item .faq-question svg {
    transition: transform 0.18s ease;
}
.faq-item.active .faq-answer {
    display: block;
}
.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.testimonial {
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 24px;
}

.quote-icon {
    margin-bottom: 12px;
    color: rgba(var(--primary-rgb), 0.25);
}

.testimonial p {
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}

.author {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.author-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22), rgba(84, 166, 255, 0.18));
    border-radius: 20%;
}

.stars {
    color: #fbbf24;
    font-size: 18px;
    letter-spacing: 2px;
}

.footer-cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 24px;
    padding-top: 40px;
    margin-bottom: 24px;
    border-top: 1px solid var(--border);
}

.footer-cols h5 {
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
}

.footer-cols ul li {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-cols > div:first-child p {
    max-width: 280px;
    color: var(--text-muted);
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.socials svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.locale-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.locale-switch select {
    min-width: 110px;
    padding: 4px 8px;
    font: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

body.dark-theme .locale-switch select {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme {
    --bg-body: #0f1420;
    --bg-card: rgba(21, 27, 40, 0.92);
    --bg-card-strong: #151b28;
    --text-main: #eef2ff;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --border: rgba(148, 163, 184, 0.18);
    background-color: var(--bg-body);
}

body.dark-theme .card,
body.dark-theme .model-status,
body.dark-theme .plan-status,
body.dark-theme .score-card,
body.dark-theme .first-steps-section,
body.dark-theme .preview-card,
body.dark-theme .testimonial,
body.dark-theme .analysis-panel,
body.dark-theme .option-card,
body.dark-theme .btn-outline,
body.dark-theme .batch-report-tab,
body.dark-theme .export-format-select,
body.dark-theme .setting-option,
body.dark-theme .search-console-hero,
body.dark-theme .search-console-bridge,
body.dark-theme .search-console-toolbar,
body.dark-theme .search-console-panel,
body.dark-theme .search-console-empty,
body.dark-theme .search-console-kpi,
body.dark-theme .search-console-chart-panel,
body.dark-theme .search-console-status,
body.dark-theme .search-console-tabs {
    background: var(--bg-card-strong);
}

body.dark-theme .info-banner {
    background: linear-gradient(to right, rgba(42, 35, 86, 0.92), rgba(21, 27, 40, 0.98));
    border-color: rgba(160, 149, 255, 0.22);
}

body.dark-theme .plan-status {
    background:
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.18), transparent 34%),
        linear-gradient(180deg, rgba(27, 33, 48, 0.98), rgba(15, 20, 32, 0.98));
    border-color: rgba(148, 163, 184, 0.22);
}

body.dark-theme .plan-status-metric {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(148, 163, 184, 0.14);
}

body.dark-theme .plan-status-head strong {
    background: rgba(var(--primary-rgb), 0.16);
    border-color: rgba(var(--primary-rgb), 0.24);
}

body.dark-theme .plan-status[data-plan-key="pro"] .plan-status-head strong {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(14, 165, 233, 0.24);
}

body.dark-theme .plan-status[data-plan-key="pro_plus"] .plan-status-head strong {
    color: #fdba74;
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.24);
}

body.dark-theme .meta-chip,
body.dark-theme .data-badge,
body.dark-theme .analysis-point,
body.dark-theme .preview-image,
body.dark-theme .resource-unused-details,
body.dark-theme .resource-unused-detail-row,
body.dark-theme .resource-analysis-modal-box,
body.dark-theme .resource-analysis-facts span,
body.dark-theme .insight-specifics div,
body.dark-theme .url-mode-toggle,
body.dark-theme .batch-url-panel,
body.dark-theme .google-search-panel,
body.dark-theme .google-search-status,
body.dark-theme .search-console-account,
body.dark-theme .batch-url-list,
body.dark-theme .form-control {
    background: rgba(15, 23, 42, 0.72);
}

body.dark-theme .google-search-item {
    background: rgba(15, 23, 42, 0.64);
    border-color: rgba(148, 163, 184, 0.16);
}

body.dark-theme .search-console-table-wrap,
body.dark-theme .search-console-account {
    border-color: rgba(148, 163, 184, 0.16);
}

body.dark-theme .search-console-opportunity {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(148, 163, 184, 0.16);
}

body.dark-theme .search-console-check,
body.dark-theme .search-console-group-item,
body.dark-theme .search-console-chart-card,
body.dark-theme .search-console-trend-panel,
body.dark-theme .search-console-ai-modal-box,
body.dark-theme .search-console-chart-tooltip {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.16);
}

body.dark-theme .search-console-chart-stage {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(129, 140, 248, 0.16), transparent 40%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

body.dark-theme .search-console-chart-guide {
    stroke: rgba(226, 232, 240, 0.24);
}

body.dark-theme .search-console-check-examples span {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .search-console-bar-track,
body.dark-theme .search-console-check-track,
body.dark-theme .search-console-country-track {
    background: rgba(148, 163, 184, 0.22);
}

body.dark-theme .search-console-ai-mini {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(147, 197, 253, 0.22);
}

body.dark-theme .search-console-button-spinner {
    border-color: rgba(147, 197, 253, 0.22);
    border-top-color: #93c5fd;
}

body.dark-theme .search-console-table th {
    background: rgba(var(--primary-rgb), 0.14);
}

body.dark-theme .competitors-readiness,
body.dark-theme .competitors-step,
body.dark-theme .competitors-helper-card {
    background: rgba(15, 20, 32, 0.56);
    border-color: rgba(148, 163, 184, 0.2);
}

body.dark-theme .competitors-readiness[data-state="ready"] {
    color: #86efac;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(134, 239, 172, 0.22);
}

body.dark-theme .competitors-step > span,
body.dark-theme .competitors-count {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-theme .competitors-step[data-state="done"] > span {
    background: var(--success);
}

body.dark-theme .url-mode-toggle-buttons {
    background: rgba(var(--primary-rgb), 0.14);
    border-color: rgba(var(--primary-rgb), 0.22);
}

body.dark-theme .badge-purple,
body.dark-theme .option-card.active {
    background: rgba(var(--primary-rgb), 0.18);
}

body.dark-theme .scenario-choice-group-head strong {
    color: var(--text-main);
}

body.dark-theme .scenario-choice-group-head span {
    color: var(--text-muted);
}

body.dark-theme .option-card.is-locked {
    background: rgba(15, 23, 42, 0.62);
}

body.dark-theme .option-card.is-unavailable {
    background: linear-gradient(180deg, rgba(120, 74, 11, 0.24), rgba(15, 23, 42, 0.82));
    border-color: rgba(245, 158, 11, 0.22);
}

body.dark-theme .option-card.is-locked .option-cost {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .option-card.is-unavailable .option-cost {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.24);
}

body.dark-theme .option-cost-btn:hover:not(:disabled),
body.dark-theme .option-cost-btn:focus-visible:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.2);
}

body.dark-theme .circle-bg {
    stroke: rgba(148, 163, 184, 0.2);
}

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

    .options-grid--grouped {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scores-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .sidebar {
        width: 228px;
    }

    .main-content {
        width: calc(100vw - 228px);
        max-width: calc(100vw - 228px);
        margin-left: 228px;
        padding: 28px 28px 40px;
    }

    body[data-dashboard-view="cookie-banner"] .main-content {
        padding-top: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .page-header,
    .form-row,
    .info-banner,
    .preview-card {
        flex-direction: column;
    }

    .model-status,
    .plan-status {
        width: 100%;
    }

    .settings-panel {
        grid-template-columns: 1fr;
    }

    .form-group.small {
        flex: 1;
    }

    .info-list,
    .faq-grid,
    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }

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

    .first-steps-list {
        grid-template-columns: 1fr;
    }

    .preview-image {
        width: 100%;
    }

    .preview-screenshots,
    .visual-analysis-shots {
        --shot-height: 300px;
        grid-template-columns: minmax(0, 1fr) 118px;
    }

    .resource-unused-details-head {
        display: grid;
    }

    .resource-unused-details-head span {
        max-width: none;
        text-align: left;
    }

    .resource-unused-detail-row {
        grid-template-columns: 1fr;
    }

    .tab:last-child {
        margin-left: 0;
    }
}

/* ── Mobile topbar (only on small screens) ────────────── */
.mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 11;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(124, 110, 255, 0.16), transparent 28%),
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-soft) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.45);
}

.mobile-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ── Hamburger / mobile nav toggle ─────────────────── */
.mobile-nav-toggle {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.mobile-nav-toggle:hover { background: rgba(255, 255, 255, 0.18); }

/* ── Sidebar backdrop (drawer overlay) ─────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s;
}
.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 860px) {
    body {
        display: block;
    }

    .mobile-topbar {
        display: flex;
        padding: 10px 10px;
        z-index: 30;
    }

    .mobile-nav-toggle {
        display: inline-flex;
    }

    .sidebar-backdrop {
        display: block;
        z-index: 39;
    }

    /* Sidebar becomes a fixed drawer that slides in from the left */
    .sidebar {
        z-index: 40;
        height: 100vh;
        width: 272px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(.4, 0, .2, 1);
        box-shadow: none;
    }

    .sidebar.nav-open {
        transform: translateX(0);
        box-shadow: 18px 0 64px -24px rgba(0, 0, 0, 0.65);
    }

    .logo-area {
        display: none;
    }

    /* Nav & bottom always visible inside the drawer */
    .nav-menu,
    .sidebar-bottom {
        display: flex;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        padding: 20px 10px 32px;
    }

    body[data-dashboard-view="cookie-banner"] .main-content {
        padding-top: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .page-header,
    .form-actions,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions {
        gap: 12px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .form-actions > .btn-settings {
        align-self: flex-start;
        max-width: 100%;
        min-height: 42px;
        padding: 10px 0;
    }

    .form-actions-main {
        width: 100%;
        gap: 8px;
        margin-left: 0;
        justify-items: stretch;
    }

    .form-actions-main.is-floating {
        padding: 10px 12px 12px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(var(--primary-rgb), 0.12);
        border-radius: 12px;
        box-shadow: 0 20px 40px -28px rgba(15, 23, 42, 0.45);
    }

    .form-run-hint {
        max-width: none;
        text-align: center;
    }

    #run-analysis-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 16px;
        font-size: 13px;
    }

    .batch-url-panel {
        grid-template-columns: 1fr;
    }

    .competitors-panel-head,
    .competitors-fields {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .competitors-readiness {
        width: 100%;
        max-width: none;
    }

    .competitors-setup-grid {
        grid-template-columns: 1fr;
    }

    .google-search-head,
    .google-search-controls,
    .google-search-use-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .google-search-actions,
    .google-search-use-actions,
    .google-search-controls .form-control,
    .google-search-load {
        width: 100%;
    }

    .google-search-actions .btn-settings,
    .google-search-use-actions .btn-settings {
        justify-content: center;
        width: 100%;
    }

    .google-search-data {
        grid-template-columns: 1fr;
    }

    .url-mode-toggle {
        flex-direction: column;
        align-items: stretch;
    }

    .url-mode-toggle-buttons {
        width: 100%;
    }

    .url-mode-toggle-btn {
        flex: 1;
    }

    .options-grid,
    .scores-grid,
    .faq-grid,
    .footer-cols,
    .info-list {
        grid-template-columns: 1fr;
    }

    .scenario-choice-group--wide {
        grid-column: auto;
    }

    .scenario-choice-group--wide .scenario-choice-group-options {
        grid-template-columns: 1fr;
    }

    .tabs {
        align-items: stretch;
    }

    .tab,
    .tab:last-child {
        width: 100%;
        margin-left: 0;
    }

    .analysis-panel-header,
    .first-steps-head,
    .analysis-point {
        flex-direction: column;
    }

    .plan-subsections {
        grid-template-columns: 1fr;
    }

    .plan-step {
        grid-template-columns: 1fr;
    }

    .plan-step-head {
        flex-direction: column;
    }

    .plan-step-meta {
        justify-content: flex-start;
    }

    /* Stack local-ai-cards vertically on mobile */
    .sidebar .sidebar-bottom {
        flex-direction: column;
        gap: 8px;
        padding-bottom: 8px;
    }

    .sidebar .local-ai-card {
        padding: 10px 12px;
    }

    .sidebar .version {
        display: none;
    }
}

@media (max-width: 640px) {
    .mobile-topbar {
        padding: 10px 8px;
    }

    .main-content {
        padding: 16px 8px 28px;
    }

    body[data-dashboard-view="cookie-banner"] .main-content {
        padding-top: 0;
        padding-right: 0;
        padding-left: 0;
    }

    .plan-status {
        min-width: 0;
        padding: 14px;
    }

    .plan-status-quota {
        grid-template-columns: 1fr;
    }

    .plan-status-metric {
        min-height: 74px;
    }

    .insight-card {
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr);
        align-items: start;
        gap: 10px 12px;
        padding: 14px 12px;
    }

    .results-wrapper .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .results-wrapper .section-header h2 {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 18px;
    }

    .report-actions,
    .results-wrapper .section-header .btn-outline,
    .export-format-select {
        width: 100%;
    }

    .report-actions {
        justify-content: center;
    }

    .export-format-label {
        width: 100%;
        text-align: left;
    }

    .results-wrapper .section-header .btn-outline {
        justify-content: center;
        margin-left: 0 !important;
    }

    .settings-modal-actions,
    .settings-modal-actions-group {
        width: 100%;
    }

    .settings-modal-actions {
        align-items: stretch;
    }

    .settings-modal-actions-group {
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .account-delete-btn--settings,
    .settings-reset-btn,
    .settings-save-btn {
        width: 100%;
        justify-content: center;
    }

    .insight-card-num {
        grid-column: 1;
        grid-row: 1;
        margin-top: 2px;
    }

    .insight-card-body {
        grid-column: 2;
        grid-row: 1;
    }

    .insight-card-body strong {
        margin-bottom: 7px;
        font-size: 13.5px;
        line-height: 1.35;
    }

    .insight-card-body p {
        font-size: 12.5px;
        line-height: 1.55;
    }

    .point-priority {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        min-height: 28px;
        padding: 4px 9px;
        font-size: 10px;
        letter-spacing: 0.03em;
    }

    .detail-btn {
        margin-top: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }

    .resource-weight-head {
        flex-direction: column;
    }

    .resource-weight-total {
        min-width: 0;
        text-align: left;
    }

    .resource-weight-buckets {
        grid-template-columns: 1fr;
    }

    .resource-file-name {
        max-width: 210px;
    }
}

/* ===== Спиннер-оверлей ===== */
.analysis-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(247, 248, 252, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

body[data-analysis-state="running"] .analysis-overlay { display: flex; }
body[data-analysis-game-result="visible"] .analysis-overlay { display: flex; }

.analysis-overlay--game-active {
    gap: 12px;
    justify-content: center;
}

.analysis-overlay--game-active .overlay-steps {
    display: none;
}

.spinner-ring {
    width: 54px;
    height: 54px;
    border: 4px solid rgba(108, 92, 231, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin-ring 0.85s linear infinite;
}

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

.overlay-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.overlay-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -10px;
}

.overlay-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.overlay-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    min-width: 280px;
}

.overlay-step.active {
    color: var(--text-main);
    border-color: rgba(var(--primary-rgb), 0.35);
    background: rgba(var(--primary-rgb), 0.05);
}

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

.overlay-step.active .overlay-step-dot {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.analysis-game-slot {
    width: min(760px, calc(100vw - 32px));
    margin-top: 6px;
}

.analysis-game-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    margin: 0 auto;
    color: #111;
    background: #fff;
    border: 2px solid #111;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    animation: game-start-pulse 0.9s ease-in-out infinite;
}

.analysis-game-start[hidden],
.analysis-game-loading[hidden],
.analysis-game-root[hidden],
.analysis-game-slot[hidden] {
    display: none;
}

@keyframes game-start-pulse {
    0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13), 0 0 0 0 rgba(var(--primary-rgb), 0); }
    50% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13), 0 0 0 7px rgba(var(--primary-rgb), 0.16); }
}

.analysis-game-loading {
    width: min(360px, calc(100vw - 52px));
    margin: 0 auto;
    padding: 14px 16px;
    color: var(--text-main);
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.analysis-game-loading-label {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.analysis-game-loading-track {
    height: 8px;
    overflow: hidden;
    background: rgba(var(--primary-rgb), 0.12);
    border-radius: 999px;
}

.analysis-game-loading-bar {
    width: 45%;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
    animation: game-loading-bar 0.75s ease-in-out infinite alternate;
}

@keyframes game-loading-bar {
    from { transform: translateX(-35%); }
    to { transform: translateX(145%); }
}

.analysis-game-root {
    width: 100%;
}

.runner-game-shell {
    position: relative;
    overflow: hidden;
    color: #f7f7f7;
    background: #111;
    border: 3px solid #111;
    border-radius: 2px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.runner-game-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 6.1;
    background: #fff;
    image-rendering: pixelated;
    touch-action: manipulation;
}

.runner-game-hud {
    position: absolute;
    top: 14px;
    right: 18px;
    text-align: right;
    color: #111;
    text-transform: uppercase;
    pointer-events: none;
}

.runner-game-score {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}

.runner-game-best {
    margin-top: 5px;
    color: #777;
    font-size: 13px;
    font-weight: 800;
}

.runner-result-pill {
    position: absolute;
    top: 12px;
    left: 14px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(17, 17, 17, 0.94);
    border: 2px solid #111;
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.runner-control-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
    border-top: 3px solid #111;
}

.runner-space-key {
    min-width: 190px;
    min-height: 44px;
    padding: 0 28px;
    color: #fff;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 7px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.runner-space-hint {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    text-align: center;
}

.runner-game-message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
    color: #111;
    background: rgba(255, 255, 255, 0.86);
}

.runner-game-message[hidden] {
    display: none;
}

.runner-game-message strong {
    font-size: 21px;
    font-weight: 900;
}

.runner-game-message p {
    max-width: 360px;
    margin: 0;
    color: #333;
    font-size: 13px;
    line-height: 1.45;
}

.runner-game-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.runner-game-actions button {
    min-height: 36px;
    padding: 0 14px;
    color: #111;
    background: #fff;
    border: 2px solid #111;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 760px) {
    .analysis-overlay--game-active {
        padding: 14px 10px;
        justify-content: flex-start;
    }

    .analysis-overlay--game-active .spinner-ring {
        width: 38px;
        height: 38px;
        border-width: 3px;
    }

    .analysis-game-slot {
        width: min(100%, calc(100vw - 18px));
    }

    .runner-game-canvas {
        aspect-ratio: 16 / 7.4;
    }

    .runner-game-hud {
        top: 10px;
        right: 11px;
    }

    .runner-game-score {
        font-size: 15px;
    }

    .runner-game-best {
        font-size: 11px;
    }

    .runner-space-key {
        width: min(280px, 86vw);
        min-height: 48px;
        font-size: 18px;
    }

    .runner-space-hint {
        font-size: 12px;
    }
}

body.dark-theme .analysis-overlay {
    background: rgba(15, 20, 32, 0.9);
}

.keyword-title-section {
    margin-bottom: 32px;
}

.keyword-title-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.keyword-title-head h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.keyword-title-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.keyword-title-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 20px;
}

.keyword-title-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.keyword-title-card-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.title-suggestions-list {
    display: grid;
    gap: 14px;
}

.title-suggestion {
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 14px 16px;
    background: rgba(var(--primary-rgb), 0.03);
}

.snippet-line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: flex-start;
}

.snippet-line + .snippet-line {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--primary-rgb), 0.12);
}

.snippet-line-label {
    padding-top: 4px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.title-suggestion-text,
.title-suggestion-description {
    margin: 0;
    line-height: 1.45;
    color: var(--text-main);
}

.title-suggestion-text {
    font-size: 15px;
    font-weight: 700;
}

.title-suggestion-description {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-muted);
}

.copy-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.copy-icon-btn:hover {
    border-color: rgba(var(--primary-rgb), 0.38);
    background: rgba(var(--primary-rgb), 0.08);
}

.title-suggestion-why {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text-muted);
}

.title-suggestion--guidance {
    background: rgba(14, 165, 233, 0.06);
}

.keyword-guidance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.keyword-guidance-head strong {
    color: var(--text-main);
    font-size: 14px;
}

.keyword-guidance-status {
    padding: 3px 8px;
    border-radius: 999px;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.12);
    font-size: 11px;
    font-weight: 800;
}

.keyword-guidance-status--ok {
    color: #166534;
    background: rgba(34, 197, 94, 0.1);
}

.keyword-guidance-status--high,
.keyword-guidance-status--low {
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
}

.keyword-guidance-facts,
.keyword-guidance-placement,
.keyword-guidance-support {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.keyword-guidance-facts span,
.keyword-placement-chip {
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    line-height: 1.35;
}

.keyword-placement-chip.ok {
    color: #166534;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.08);
}

.keyword-placement-chip.warn {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.08);
}

.keyword-guidance-support {
    display: grid;
    gap: 8px;
}

.keyword-guidance-support strong {
    color: var(--text-main);
    font-size: 12px;
}

.keyword-footer {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.keyword-footer h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.keyword-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* ===== Визуальный анализ ===== */
.visual-analysis-section {
    margin-bottom: 32px;
}

.visual-analysis-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.visual-analysis-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 20px;
}

.visual-analysis-card img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border);
    object-fit: cover;
    object-position: top;
    max-height: 280px;
}

.visual-analysis-shots {
    --shot-height: clamp(320px, 36vw, 430px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: stretch;
}

.visual-shot {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    position: relative;
    min-width: 0;
    height: var(--shot-height);
    margin: 0;
    overflow: hidden;
    padding: 10px;
    background: linear-gradient(180deg, #e8eef8 0%, #dfe7f2 100%);
    border-radius: 5px;
}

.visual-shot img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 4px;
}

.visual-shot--desktop { aspect-ratio: auto; }
.visual-shot--mobile { aspect-ratio: auto; }

.visual-analysis-text {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-main);
    white-space: pre-line;
}

@media (max-width: 860px) {
    .snippet-line {
        grid-template-columns: minmax(0, 1fr) 36px;
    }

    .snippet-line-label {
        grid-column: 1 / -1;
        padding-top: 0;
    }

    .visual-analysis-card {
        grid-template-columns: 1fr;
    }
}

body.dark-theme .keyword-title-card,
body.dark-theme .first-step-card,
body.dark-theme .title-suggestion {
    background: rgba(17, 24, 39, 0.92);
}

body.dark-theme .copy-icon-btn,
body.dark-theme .keyword-guidance-facts span,
body.dark-theme .keyword-placement-chip,
body.dark-theme .keyword-chip {
    background: rgba(15, 23, 42, 0.72);
}

body.dark-theme .snippet-line + .snippet-line,
body.dark-theme .keyword-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* === Detail drill-down === */
.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    transition: border-color 0.15s, color 0.15s;
}
.detail-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.detail-btn.loading {
    opacity: 0.75;
    pointer-events: none;
    gap: 6px;
}
.detail-btn.queued {
    opacity: 0.55;
    pointer-events: none;
    cursor: wait;
}
.detail-btn .db-spinner {
    display: none;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(var(--primary-rgb), 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: db-spin 0.65s linear infinite;
    flex-shrink: 0;
}
.detail-btn.loading .db-spinner { display: inline-block; }
.detail-btn.loading .db-icon    { display: none; }
@keyframes db-spin { to { transform: rotate(360deg); } }
.detail-result {
    margin-top: 8px;
    padding: 11px 13px;
    border-radius: 7px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(var(--primary-rgb), 0.03);
    font-size: 12.5px;
    line-height: 1.6;
}
.detail-result[hidden] { display: none; }
.detail-result-header {
    margin-bottom: 7px;
}
.detail-result-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary);
    opacity: 0.7;
}
.detail-why  { color: var(--text); margin-bottom: 8px; }
.detail-section-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin: 10px 0 4px;
}
.detail-steps ol {
    margin: 0;
    padding-left: 18px;
}
.detail-steps li {
    margin-bottom: 4px;
    color: var(--text);
}
.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}
.detail-chip {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(var(--primary-rgb), 0.10);
    color: var(--primary);
    font-weight: 600;
}
.detail-example {
    margin-top: 6px;
    padding: 8px 10px;
    border-left: 2px solid var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    font-size: 12.5px;
    color: var(--text);
    border-radius: 0 4px 4px 0;
}

.seodot-inline-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.seodot-inline-link:hover {
    color: var(--primary);
}

.seodot-anchor-pulse {
    animation: seodot-anchor-pulse 1s ease-in-out 5;
}

@keyframes seodot-anchor-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
    50% {
        /* Пик: Чуть больше, чем было, и чуть ярче */
        box-shadow: 0 0 0 16px rgba(var(--primary-rgb), 10.25); /* Увеличено с 5px до 6px и с 0.18 до 0.25 */
    }
}
.detail-error {
    color: #dc2626;
    font-size: 12.5px;
}

/* === Site compare inline view === */
.site-cmp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.site-cmp-summary {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}

/* === Comparison modal === */
.cmp-overview {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 18px;
}

.cmp-score-ring {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.cmp-score-ring svg { display: block; }

.cmp-score-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
}

.cmp-score-label small {
    display: block;
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
    line-height: 1;
}

.cmp-overview-meta { display: grid; gap: 6px; }
.cmp-overview-summary { font-size: 13px; line-height: 1.6; color: var(--text); }

.cmp-result-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cmp-result-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.cmp-result-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cmp-mode-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    border-radius: 999px;
}

.cmp-before-after-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.cmp-ba-card {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.cmp-ba-label {
    display: inline-flex;
    margin-bottom: 7px;
    padding: 3px 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--primary);
    border-radius: 999px;
}

.cmp-ba-url {
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.cmp-ba-date {
    color: var(--text-muted);
    font-size: 11px;
}

.cmp-highlights {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cmp-highlight-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmp-highlight-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid;
}

.cmp-highlight-pill.best {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.cmp-highlight-pill.weak {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.cmp-highlight-note {
    max-width: 420px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.cmp-highlight-note strong {
    color: var(--text-main);
}

.cmp-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.cmp-page-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-card);
}

.cmp-page-url {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    word-break: break-all;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.cmp-page-scores {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.cmp-page-scores.is-resource-load {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cmp-page-focus {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-main);
}

.cmp-page-focus strong {
    color: var(--text-muted);
}

.cmp-page-score {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    border-radius: 5px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
}

.cmp-page-score-val {
    font-size: 15px;
    font-weight: 800;
    display: block;
    color: var(--primary);
}

.cmp-page-score-lbl {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.cmp-page-issues {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.cmp-page-issues li {
    list-style: none;
    padding-left: 12px;
    position: relative;
    margin-bottom: 2px;
}

.cmp-page-issues li::before {
    content: '·';
    position: absolute;
    left: 2px;
    color: var(--text-muted);
}

.cmp-page-issues li.good::before { content: '✓'; color: #16a34a; }
.cmp-page-issues li.good { color: #047857; }

.cmp-cross-recs {
    margin-bottom: 18px;
}

.cmp-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.cmp-rec {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: 5px;
    background: var(--bg-card);
    margin-bottom: 8px;
}

.cmp-rec.high  { border-left-color: #ef4444; }
.cmp-rec.medium { border-left-color: #f59e0b; }
.cmp-rec.low   { border-left-color: #22c55e; }

.cmp-rec-body strong {
    font-size: 13px;
    display: block;
    margin-bottom: 3px;
}

.cmp-rec-body p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.cmp-consistency-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.cmp-cons-card {
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.cmp-cons-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cmp-cons-rating {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 5px;
}

.cmp-cons-rating.excellent { color: #16a34a; }
.cmp-cons-rating.good      { color: #2563eb; }
.cmp-cons-rating.weak      { color: #d97706; }
.cmp-cons-rating.critical  { color: #dc2626; }

.cmp-cons-details {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── Visual UX scenario ───────────────────────────────────── */
.visual-section { padding: 2px 0; }

.visual-overview {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-main);
    margin: 0 0 18px;
}

.visual-comfort-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.visual-comfort-card {
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.visual-comfort-card.convenient  { background: rgba(34,197,94,0.07); border-color: rgba(34,197,94,0.25); }
.visual-comfort-card.inconvenient { background: rgba(234,179,8,0.07); border-color: rgba(234,179,8,0.28); }

.visual-comfort-icon { font-size: 18px; margin-bottom: 5px; }

.visual-comfort-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.visual-comfort-card p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-main);
    margin: 0;
}

.visual-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.visual-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    background: var(--bg-card);
    border: 1px solid var(--border);
    position: relative;
}

.visual-item--pro  { border-left-color: #22c55e; }
.visual-item--con  { border-left-color: #f59e0b; }
.visual-item--rec  { border-left-color: #3b82f6; }

.visual-item-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.visual-item strong {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
    color: var(--text-main);
}

.visual-item p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.visual-rec-num {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.6;
}

.visual-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.visual-summary-table th {
    text-align: left;
    padding: 7px 10px;
    background: var(--bg-card-strong, rgba(0,0,0,0.04));
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.visual-summary-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-main);
    line-height: 1.55;
}

.visual-summary-table tr:last-child td { border-bottom: none; }

.visual-rating {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.visual-rating.rating-good   { background: rgba(34,197,94,0.12);  color: #16a34a; }
.visual-rating.rating-medium { background: rgba(234,179,8,0.12);  color: #b45309; }
.visual-rating.rating-bad    { background: rgba(239,68,68,0.10);  color: #dc2626; }

body.dark-theme .visual-rating.rating-good   { background: rgba(34,197,94,0.18);  color: #4ade80; }
body.dark-theme .visual-rating.rating-medium { background: rgba(234,179,8,0.18);  color: #fbbf24; }
body.dark-theme .visual-rating.rating-bad    { background: rgba(239,68,68,0.16);  color: #f87171; }

.visual-conclusion {
    padding: 14px 16px;
    background: rgba(var(--primary-rgb), 0.06);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-main);
}

.cmp-job-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.cmp-job-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color 0.15s;
}

.cmp-job-row:hover { border-color: var(--primary); }

.cmp-job-row.is-disabled {
    opacity: 0.56;
    cursor: not-allowed;
    background: rgba(148, 163, 184, 0.08);
}

.cmp-job-row.is-disabled:hover {
    border-color: var(--border);
}

.cmp-job-row.selected {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
}

.cmp-job-row input[type=checkbox] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.cmp-job-url {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmp-job-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.cmp-recent-panel {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(var(--primary-rgb), 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cmp-recent-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-main);
}

.cmp-recent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    background: var(--bg-card-strong);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.cmp-recent-name {
    min-width: 0;
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmp-recent-meta {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.cmp-recent-row button,
.cmp-result-actions button {
    min-height: 32px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-card);
}

.cmp-recent-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--text-muted);
}

.cmp-inline-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: cmp-spin 0.8s linear infinite;
}

.cmp-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.cmp-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.cmp-spinner-ring {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: cmp-spin 0.8s linear infinite;
}

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

/* ── Toast notification ─────────────────────────────────────── */
.seo-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1f2937;
    color: #f9fafb;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 24px rgba(0,0,0,0.20);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.22s, transform 0.22s;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
    text-align: center;
}
.seo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.seo-toast.error  { background: #dc2626; }
.seo-toast.success { background: #16a34a; }

.comparison-ready-notice-wrap {
    position: fixed;
    top: 16px;
    left: 50%;
    width: min(560px, calc(100vw - 24px));
    transform: translateX(-50%);
    z-index: 10025;
    pointer-events: none;
}

.comparison-ready-notice {
    position: relative;
    overflow: hidden;
    padding: 14px 16px 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(236, 253, 245, 0.97), rgba(220, 252, 231, 0.97)),
        #ecfdf5;
    box-shadow: 0 18px 46px rgba(16, 24, 40, 0.18);
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: auto;
}

.comparison-ready-notice.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.comparison-ready-notice.is-hiding {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
}

.comparison-ready-notice-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #0f766e;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.comparison-ready-notice-dismiss:hover {
    background: rgba(255, 255, 255, 0.92);
}

.comparison-ready-notice-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.comparison-ready-notice-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.comparison-ready-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 14px;
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.comparison-ready-notice-copy {
    min-width: 0;
}

.comparison-ready-notice-eyebrow {
    color: #047857;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.comparison-ready-notice-title {
    margin-top: 3px;
    color: #065f46;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comparison-ready-notice-text {
    margin-top: 3px;
    color: #065f46;
    font-size: 13px;
    line-height: 1.45;
}

.comparison-ready-notice-open {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.22);
}

.comparison-ready-notice-open:hover {
    filter: brightness(1.05);
}

.comparison-ready-notice-progress {
    margin-top: 12px;
    height: 4px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.12);
    overflow: hidden;
}

.comparison-ready-notice-progress-bar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34d399, #10b981);
    transform-origin: left center;
}

@keyframes comparison-ready-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 640px) {
    .comparison-ready-notice-body {
        grid-template-columns: 1fr;
    }

    .comparison-ready-notice-open {
        width: 100%;
    }
}

/* ── Confirm modal ──────────────────────────────────────────── */
.seo-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10030;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
    pointer-events: none;
}
.seo-confirm-backdrop.show { opacity: 1; pointer-events: all; }
.seo-confirm-box {
    background: #fff;
    border-radius: 18px;
    padding: 30px 28px 24px;
    max-width: 380px;
    width: calc(100vw - 40px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    transform: scale(0.94);
    transition: transform 0.18s;
}
.seo-confirm-backdrop.show .seo-confirm-box { transform: scale(1); }
.seo-confirm-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.seo-confirm-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 8px;
}
.seo-confirm-msg {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.55;
}
.seo-confirm-actions { display: flex; gap: 10px; }
.seo-confirm-actions button {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, filter 0.15s;
}
.seo-confirm-cancel { background: #f3f4f6; color: #374151; }
.seo-confirm-cancel:hover { background: #e5e7eb; }
.seo-confirm-ok { background: var(--primary); color: #fff; }
.seo-confirm-ok:hover { filter: brightness(1.10); }
.seo-confirm-ok.danger { background: #dc2626; }

/* Competitors mode */
.comp-summary-wrap{display:flex;flex-direction:column;gap:14px}
.comp-summary-text{font-size:15px;line-height:1.45;margin:0}
.comp-intent-text{margin:0;color:var(--text-muted,#5b6573);font-size:14px;line-height:1.45}
.comp-next-steps{border:1px solid var(--border-color,#e5e8ec);border-radius:12px;padding:14px;background:var(--surface-1,#fff);display:flex;flex-direction:column;gap:12px}
.comp-next-steps-head{display:flex;flex-direction:column;gap:4px}
.comp-next-steps-head strong{font-size:15px;line-height:1.35}
.comp-next-steps-head span{font-size:13px;line-height:1.45;color:var(--text-muted,#5b6573)}
.comp-next-steps-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.comp-next-step{display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:start}
.comp-next-step-index{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:var(--surface-2,#eef1f5);font-size:12px;font-weight:600;color:var(--text-strong,#222)}
.comp-next-step-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.comp-next-step-copy strong{font-size:14px;line-height:1.4}
.comp-next-step-copy p{margin:0;font-size:13px;line-height:1.55;color:var(--text-muted,#5b6573)}
.comp-next-step-copy a{color:var(--accent,#3568f7);word-break:break-all}
.comp-summary-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.comp-summary-card{border:1px solid var(--border-color,#e5e8ec);border-radius:10px;padding:12px;background:var(--surface-1,#fff);display:flex;flex-direction:column;gap:8px}
.comp-summary-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.comp-summary-card-head strong{font-size:14px;line-height:1.3;word-break:break-word}
.comp-summary-card-url{font-size:12px;color:var(--text-muted,#5b6573);word-break:break-all}
.comp-summary-card-blocks{display:flex;flex-wrap:wrap;gap:4px}
.comp-block{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--surface-2,#eef1f5);font-size:12px;line-height:1.5;color:var(--text-strong,#222)}
.comp-block--gap{background:#fde7e7;color:#a33}
.comp-block--muted{background:transparent;border:1px dashed var(--border-color,#e5e8ec);color:var(--text-muted,#5b6573)}
.comp-pill{display:inline-block;padding:2px 8px;border-radius:6px;background:var(--surface-2,#eef1f5);font-size:12px;line-height:1.5}
.comp-pill--small{font-size:11px;padding:1px 6px}
.comp-intent-badge{display:inline-block;padding:2px 8px;border-radius:6px;font-size:12px;line-height:1.5}
.comp-intent-badge.is-match{background:#e2f5e6;color:#216e2c}
.comp-intent-badge.is-partial{background:#fff3d6;color:#7a5a00}
.comp-intent-badge.is-no{background:#fde7e7;color:#a33}
.comp-phrases ul,.comp-list-block ul{list-style:none;padding:0;margin:6px 0 0;display:flex;flex-direction:column;gap:4px}
.comp-phrases li{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px}
.comp-phrase{font-weight:500}
.comp-phrase-note{flex-basis:100%;font-size:12px;line-height:1.45;color:var(--text-muted,#5b6573)}
.comp-summary-lists{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.comp-list-block h5,.comp-phrases h5{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted,#5b6573)}
.comp-list-block--muted{opacity:.75}
.comp-table-wrap{overflow-x:auto}
.comp-table{width:100%;border-collapse:collapse;font-size:13px}
.comp-table th,.comp-table td{padding:8px 10px;border-bottom:1px solid var(--border-color,#e5e8ec);text-align:left;vertical-align:top}
.comp-table th{background:var(--surface-2,#eef1f5);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.comp-cell-phrase{font-weight:500;min-width:160px}
.comp-cell-url{max-width:220px;word-break:break-all}
.comp-cell-url a{color:var(--accent,#3568f7)}
.comp-recommendations{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.comp-rec{border:1px solid var(--border-color,#e5e8ec);border-radius:10px;padding:12px;background:var(--surface-1,#fff);border-left-width:4px}
.comp-rec--high{border-left-color:#c0392b}
.comp-rec--medium{border-left-color:#d39e00}
.comp-rec--low{border-left-color:#2e7d32}
.comp-rec-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.comp-rec-priority{font-size:12px;color:var(--text-muted,#5b6573)}
.comp-rec p{margin:0;font-size:13px;line-height:1.5}
