:root {
    --primary: #347CF5;
    --primary-hover: #2563EB;
    --primary-light: #EFF6FF;
    --bg: #F5F7FB;
    --surface: #FFFFFF;
    --text-main: #14243C;
    --text-sec: #64748B;
    --success: #16B981;
    --success-light: #D1FAE5;
    --warning: #F5A524;
    --warning-light: #FEF3C7;
    --danger: #E65353;
    --danger-light: #FEE2E2;
    --notice: #8B5CF6;
    --notice-light: #F3E8FF;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --font: 'Plus Jakarta Sans', sans-serif;
}

body.dark-mode {
    --bg: #0F172A;
    --surface: #1E293B;
    --text-main: #F8FAFC;
    --text-sec: #94A3B8;
    --border: #334155;
    --primary-light: #1E3A8A;
    --danger-light: #7F1D1D;
    --warning-light: #78350F;
    --success-light: #064E3B;
    --notice-light: #4C1D95;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font);
}

body {
    background: var(--bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header & Search */
.topbar {
    background: var(--surface);
    padding: 15px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    margin-right: 10px;
}

.search-wrap {
    flex: 1;
    display: flex;
    gap: 10px;
    max-width: 800px;
}

.search-wrap input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: var(--bg);
    color: var(--text-main);
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-icon {
    padding: 10px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-icon:hover {
    background: var(--bg);
}

/* Layout */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 550px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    position: relative;
}

.preview-panel {
    flex: 1;
    background: #e2e8f0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}


.preview-scroll {
    flex: 1;
    overflow: auto;
}

.preview-panel iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Tabs & Badges */
.tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr));
    gap: 5px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 5;
    padding: 8px;
}

.tab-btn {
    min-width: 0;
    min-height: 40px;
    padding: 7px 5px;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-sec);
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary);
}

.tab-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.tabs > a.tab-btn {
    grid-column: span 2;
}

.tab-badge {
    flex-shrink: 0;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

.tab-content {
    padding: 25px;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

/* --- CSS TỔNG QUAN (SCORE & PROGRESS) --- */
.score-overview {
    display: flex;
    gap: 25px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}

.score-circle span {
    font-size: 32px;
    line-height: 1;
}

.score-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
}

.bar-bg {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
}

/* --- CSS ISSUES LIST (CRITICAL, WARNING, NOTICE) --- */
.issue-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.issue-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--surface);
}

.issue-header:hover {
    background: var(--bg);
}

.issue-title {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.issue-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-Critical {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-Warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-Notice {
    background: var(--notice-light);
    color: var(--notice);
}

.issue-body {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg);
    font-size: 13px;
}

.issue-body.open {
    max-height: 300px;
    padding: 15px;
    border-top: 1px solid var(--border);
}

.btn-fix {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

/* --- CSS SKELETON LOADING --- */
#loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    z-index: 100;
    padding: 30px;
}

.skeleton-title {
    width: 40%;
    height: 24px;
    background: var(--border);
    border-radius: 4px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.skeleton-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--border);
    animation: pulse 1.5s infinite;
}

.skeleton-line {
    width: 100%;
    height: 16px;
    background: var(--border);
    border-radius: 4px;
    margin-bottom: 10px;
    animation: pulse 1.5s infinite;
}

.skeleton-line.short {
    width: 60%;
}

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

/* --- CSS HEADINGS --- */
.heading-item {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    border-left-width: 4px;
}

.heading-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.heading-item.h1 {
    margin-left: 0px;
    border-left-color: var(--primary);
    font-weight: 700;
    font-size: 15px;
}

.heading-item.h2 {
    margin-left: 20px;
    border-left-color: #8B5CF6;
    font-weight: 600;
    font-size: 14px;
}

.heading-item.h3 {
    margin-left: 40px;
    border-left-color: var(--warning);
    font-size: 13px;
}

.heading-item.h4, .heading-item.h5, .heading-item.h6 {
    margin-left: 60px;
    border-left-color: var(--text-sec);
    font-size: 13px;
}

.heading-item.error {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-left-width: 4px;
    color: var(--danger);
}

.heading-item.error .tag {
    background: var(--danger);
    color: #fff;
}

.tag {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: var(--text-sec);
}

/* --- CSS LINKS & FILTER --- */
.link-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-sec);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.link-item {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-item:hover {
    background: var(--bg);
}

.link-text {
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.link-url {
    font-size: 11px;
    color: var(--text-sec);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 350px;
}

.badge-in {
    color: var(--success);
    font-weight: bold;
    font-size: 11px;
}

.badge-out {
    color: var(--warning);
    font-weight: bold;
    font-size: 11px;
}

/* Utility */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.bg-error {
    background: var(--danger-light);
    color: var(--danger);
}

.bg-warning {
    background: var(--warning-light);
    color: var(--warning);
}

a.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--primary-light);
}

/* Nút tải llms.txt */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--notice);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 15px;
    cursor: pointer;
    border: none;
}

.btn-download:hover {
    background: #7C3AED;
}

/* CSS CHO TÓM TẮT THẺ H */
.heading-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.heading-toggle {
    border: 1px solid var(--border);
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.heading-toggle[aria-pressed="true"] {
    border-color: var(--primary);
    background: var(--primary-light);
}

.heading-toggle:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.heading-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.h-stat {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.h-stat h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
}

.h-stat p {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
}

/* Màu sắc cho số lượng thẻ */
.h-stat.h1-stat h3 {
    color: var(--primary);
}

.h-stat.h2-stat h3 {
    color: var(--notice);
}

.h-stat.h3-stat h3 {
    color: var(--warning);
}

/* Khi có lỗi (VD: Thiếu H1) */
.h-stat.error {
    border-color: var(--danger);
    background: var(--danger-light);
}

.h-stat.error h3 {
    color: var(--danger);
}

.heading-alerts {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.heading-alerts h4 {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.heading-alerts ul {
    padding-left: 20px;
    font-size: 13px;
    color: var(--danger);
}

.heading-alerts li {
    margin-bottom: 4px;
}

.topbar {
    padding: 13px 22px;
    box-shadow: 0 4px 20px rgba(29, 66, 113, .035);
    min-height: 74px
}

.logo {
    display: flex;
    align-items: center
}

.logo img {
    width: 175px;
    max-width: 175px;
    object-fit: contain
}

.btn-primary {
    border-radius: 10px;
    box-shadow: 0 7px 15px rgba(52, 124, 245, .17)
}

.btn-icon {
    border-radius: 10px
}

.sidebar {
    width: clamp(430px, 35vw, 560px)
}

.workspace {
    min-height: 0
}

.tabs {
    scrollbar-width: thin
}

.tab-content {
    padding: 22px
}

.card, .score-overview {
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(38, 65, 115, .045)
}

.tab-btn.active {
    color: #236be6
}

.export-wrap {
    position: relative
}

.export-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 185px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(19, 49, 99, .18);
    z-index: 55;
    padding: 6px
}

.export-menu[hidden] {
    display: none
}

.export-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 11px 12px;
    border-radius: 7px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 12px
}

.export-menu button:hover {
    background: var(--primary-light);
    color: var(--primary)
}

.tool-back {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-sec)
}

.tool-back:hover {
    color: var(--primary)
}

.cwv-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px
}

.cwv-hint {
    font-size: 12px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px;
    line-height: 1.75;
    color: var(--text-sec);
    margin-bottom: 15px
}

.tool-intro {
    flex: 1;
    overflow-y: auto;
    padding: clamp(60px, 9vh, 120px) 24px;
    background: radial-gradient(ellipse at 75% 15%, #deecff, transparent 55%), #f7f9fe
}

.tool-intro-inner {
    max-width: 840px;
    margin: auto;
    text-align: center
}

.tool-kicker {
    display: inline-block;
    background: #e6f0ff;
    border: 1px solid #cbdfff;
    border-radius: 99px;
    padding: 8px 15px;
    color: #2b71e5;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px
}

.tool-intro h1 {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.2;
    margin: 23px 0;
    letter-spacing: -1.8px
}

.tool-intro h1 span {
    color: #3379f4
}

.tool-intro p {
    color: #657993;
    font-size: 15px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.9
}

.tool-intro-grid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 16px;
    margin-top: 38px
}

.tool-intro-grid > div {
    background: white;
    border: 1px solid #e0e9f8;
    box-shadow: 0 13px 28px rgba(37, 87, 139, .06);
    border-radius: 14px;
    padding: 21px 16px;
    text-align: left
}

.tool-intro-grid b {
    display: block;
    font-size: 13px
}

.tool-intro-grid span {
    display: block;
    font-size: 12px;
    color: #8190a8;
    margin-top: 8px;
    line-height: 1.7
}

.tool-intro .intro-small {
    font-size: 12px;
    margin-top: 27px
}

.intro-small a {
    color: #2771e7;
    font-weight: 700
}

.issue-item {
    transition: border-color .2s, box-shadow .2s
}

.issue-item:hover {
    border-color: #b4ccf3;
    box-shadow: 0 3px 10px rgba(25, 64, 122, .06)
}

@media (max-width: 1050px) {
    .topbar {
        flex-wrap: wrap;
        gap: 9px
    }

    .search-wrap {
        order: 2;
        width: 100%;
        flex-basis: 100%;
        max-width: none
    }

    .tool-back {
        display: none
    }

    .sidebar {
        width: 46%
    }

    .tab-content {
        padding: 15px
    }
}

@media (max-width: 760px) {
    body {
        height: auto;
        min-height: 100vh;
        overflow: visible
    }

    .workspace {
        flex-direction: column;
        overflow: visible
    }

    .sidebar {
        width: 100%;
        max-height: none;
        overflow: visible
    }

    .preview-panel {
        min-height: 580px
    }

    .preview-scroll {
        height: 580px
    }

    .tool-intro-grid {
        grid-template-columns:1fr
    }

    .score-overview {
        gap: 13px
    }

    .topbar {
        position: sticky;
        top: 0
    }

    .tab-content {
        padding: 15px
    }

    .logo img {
        width: 139px
    }

    .search-wrap {
        order: 2
    }

    .tool-back {
        display: none
    }

    .issue-title {
        font-size: 12px
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *:before, *:after {
        animation: none !important;
        transition: none !important
    }
}

.scan-options {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 11px;
    flex-basis: 100%;
    order: 3
}

.scan-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-sec)
}

.scan-options select {
    max-width: 190px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-main);
    font: inherit
}

.topbar {
    flex-wrap: wrap
}

#device-comparison details, #link-audit-details details {
    overflow-wrap: anywhere
}

.overview-alerts {
    padding: 12px;
    border: 1px solid var(--warning);
    background: var(--warning-light);
    border-radius: 12px;
    margin-bottom: 14px;
    display: grid;
    gap: 7px;
    font-size: 12px
}

.overview-alerts[hidden] {
    display: none
}

.overview-alerts button {
    border: 0;
    background: transparent;
    color: var(--text-main);
    text-align: left;
    text-decoration: underline;
    font: inherit;
    cursor: pointer;
    overflow-wrap: anywhere
}

.schema-template summary {
    cursor: pointer;
    font-weight: 700
}

.schema-template p, #schema-advice > p {
    font-size: 12px;
    line-height: 1.7;
    margin: 10px 0;
    overflow-wrap: anywhere
}

.schema-template textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: 11px/1.6 monospace;
    background: var(--bg);
    color: var(--text-main);
    resize: vertical
}

.workspace, .sidebar, .search-wrap, .score-bars, .card, .tab-content, .link-item > div {
    min-width: 0
}

.card pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.issue-title, .issue-body, .link-url, #device-comparison, #link-audit-details {
    overflow-wrap: anywhere
}

.tabs {
    grid-template-columns:repeat(auto-fit, minmax(98px, 1fr))
}

.tab-btn {
    flex-wrap: wrap
}

.tab-badge {
    flex: none
}

.search-wrap input {
    min-width: 0
}

.sidebar {
    flex-shrink: 0
}

@media (max-width: 760px) {
    .topbar {
        position: relative;
        min-height: 0;
        padding: 10px 12px;
        gap: 8px
    }

    .logo img {
        width: 125px;
        height: auto
    }

    .topbar #btnExport {
        display: none !important
    }

    .topbar .btn-primary {
        padding: 10px 12px;
        font-size: 12px
    }

    .topbar #exportWrap {
        margin-left: auto
    }

    .search-wrap {
        display: grid;
        grid-template-columns:minmax(0, 1fr) auto;
        gap: 6px
    }

    .search-wrap input {
        width: 100%;
        padding: 10px;
        font-size: 12px
    }

    .scan-options {
        gap: 8px;
        font-size: 11px
    }

    .scan-options label:last-child {
        flex: 1
    }

    .scan-options select {
        max-width: 100%
    }

    .tabs {
        position: sticky;
        top: 0;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 6px
    }

    .tab-btn {
        font-size: 11px;
        padding: 7px 3px;
        gap: 3px;
        min-height: 38px
    }

    .score-overview {
        padding: 13px;
        gap: 12px
    }

    .score-circle {
        width: 86px;
        height: 86px
    }

    .score-circle span {
        font-size: 27px
    }

    .score-bars {
        gap: 8px
    }

    .bar-label {
        font-size: 10px;
        gap: 5px
    }

    .bar-label > span:first-child {
        max-width: 70%
    }

    .tab-content {
        padding: 12px
    }

    .card {
        padding: 13px
    }

    .issue-header {
        align-items: flex-start;
        gap: 5px
    }

    .issue-title {
        font-size: 12px
    }

    .issue-body {
        padding: 12px
    }

    .preview-panel {
        min-height: 420px
    }

    .preview-scroll {
        height: 420px
    }

    .link-text, .link-url {
        white-space: normal;
        overflow-wrap: anywhere
    }

    .tab-content table {
        table-layout: fixed;
        width: 100%
    }

    .tab-content td, .tab-content th {
        overflow-wrap: anywhere
    }

    .cwv-actions {
        flex-wrap: wrap
    }
}


/* Focused URL entry header */
.topbar.audit-header {
    display: block;
    padding: 0 28px 20px;
    flex: none;
    position: relative;
    background: var(--surface);
    border-bottom: 1px solid var(--border)
}

.audit-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 65px;
    border-bottom: 1px solid var(--border)
}

.audit-header .logo {
    margin: 0
}

.audit-header .logo img {
    width: 154px;
    height: 38px
}

.audit-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.audit-header .tool-back {
    display: inline-flex;
    text-decoration: none;
    font-size: 12px;
    color: var(--text-sec)
}

.audit-search-area {
    max-width: 1000px;
    margin: 20px auto 0
}

.audit-search-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px
}

.audit-search-heading h2 {
    font-size: 21px;
    letter-spacing: -.6px;
    line-height: 1.4
}

.audit-search-heading p {
    font-size: 12px;
    color: var(--text-sec);
    line-height: 1.6
}

.audit-url-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main)
}

.audit-header .search-wrap {
    display: flex;
    max-width: none;
    width: 100%;
    gap: 10px;
    order: initial
}

.audit-header .search-wrap input {
    min-width: 0;
    flex: 1;
    width: 100%;
    font-size: 16px;
    padding: 15px 18px;
    border: 2px solid #abc8fa;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-main);
    transition: border-color .2s, box-shadow .2s
}

.audit-header .search-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px #347cf51a
}

.audit-header #btnAnalyze {
    flex: none;
    font-size: 14px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: 12px
}

.audit-header #btnAnalyze span {
    font-size: 20px
}

.audit-search-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-top: 10px
}

.audit-search-footer > p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--text-sec)
}

.audit-options {
    position: relative;
    flex: none
}

.audit-options summary {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sec);
    cursor: pointer;
    padding: 0 0 4px
}

.audit-options .scan-options {
    position: absolute;
    right: 0;
    top: 30px;
    width: 350px;
    max-width: calc(100vw - 36px);
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 12px 40px #0f234c20;
    z-index: 30;
    font-size: 12px
}

.audit-options .scan-options label {
    justify-content: space-between;
    gap: 12px
}

.audit-options .scan-options label:nth-child(2) {
    justify-content: flex-start
}

.audit-options .scan-options select {
    padding: 8px;
    max-width: 210px
}

.audit-header button:focus-visible, .audit-options summary:focus-visible, .audit-header a:focus-visible {
    outline: 3px solid #80b1fa;
    outline-offset: 3px
}

@media (max-width: 760px) {
    .topbar.audit-header {
        padding: 0 16px 18px;
        position: relative
    }

    .audit-brand-row {
        min-height: 58px;
        gap: 10px
    }

    .audit-header .logo img {
        width: 130px;
        height: 34px
    }

    .audit-header-actions {
        gap: 8px
    }

    .audit-header .tool-back {
        font-size: 11px
    }

    .audit-header #btnTheme {
        padding: 8px 12px
    }

    .audit-search-area {
        margin-top: 18px
    }

    .audit-search-heading {
        display: block;
        margin-bottom: 16px
    }

    .audit-search-heading h2 {
        font-size: 22px;
        margin-bottom: 6px
    }

    .audit-search-heading p {
        font-size: 12px
    }

    .audit-header .search-wrap {
        display: flex;
        flex-direction: column;
        gap: 10px
    }

    .audit-header .search-wrap input {
        padding: 14px;
        font-size: 16px
    }

    .audit-header #btnAnalyze {
        padding: 13px 18px;
        width: 100%;
        font-size: 14px
    }

    .audit-search-footer {
        flex-direction: column;
        gap: 8px
    }

    .audit-options .scan-options {
        right: auto;
        left: 0
    }

    .audit-header #exportWrap {
        margin: 0
    }

    .audit-header-actions #btnDownload {
        font-size: 11px;
        padding: 8px 10px
    }
}

/* Balanced landing and report layout */
.audit-brand-row {
    max-width: 1280px;
    margin: auto
}

.audit-search-area {
    max-width: 1000px;
    margin: 24px auto 0
}

.audit-search-heading {
    display: block;
    text-align: center;
    margin-bottom: 20px
}

.audit-search-heading h2 {
    font-size: 28px;
    margin-bottom: 6px
}

.audit-search-heading p {
    font-size: 13px
}

.audit-header .search-wrap input {
    background: var(--surface);
    box-shadow: 0 4px 18px #347cf508
}

.audit-header .search-wrap {
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--primary-light)
}

.audit-url-label {
    padding-left: 3px
}

.audit-search-footer {
    padding: 0 3px
}

.tool-intro {
    padding: 32px 24px 44px;
    background: radial-gradient(ellipse at 80% 10%, #deecff, transparent 60%), var(--bg)
}

.tool-intro-inner {
    max-width: 1000px
}

.tool-intro h1 {
    font-size: clamp(26px, 3vw, 37px);
    margin: 16px 0;
    letter-spacing: -1px
}

.tool-intro p {
    font-size: 13px;
    line-height: 1.85
}

.tool-kicker {
    font-size: 10px;
    padding: 6px 12px
}

.tool-intro-grid {
    margin-top: 24px;
    gap: 16px
}

.tool-intro-grid > div {
    text-align: left;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px #1e407007;
    transition: transform .2s, box-shadow .2s
}

.tool-intro-grid > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px #1e407014
}

.tool-intro-grid b {
    font-size: 14px
}

.tool-intro-grid span {
    font-size: 12px
}

.tool-intro .intro-small {
    margin-top: 22px;
    font-size: 11px
}

.has-audit .audit-search-heading, .has-audit .audit-url-label, .has-audit #auditUrlHint {
    display: none
}

.has-audit .audit-search-area {
    margin-top: 12px;
    max-width: 1280px
}

.has-audit .audit-search-footer {
    justify-content: flex-end;
    margin-top: 6px
}

.has-audit .audit-header {
    padding-bottom: 10px
}

.has-audit .audit-brand-row {
    min-height: 56px
}

.workspace {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    min-height: 0
}

.workspace .sidebar {
    width: 32%;
    max-width: none;
    min-width: 0;
    background: var(--bg)
}

.workspace .preview-panel {
    flex: 1;
    min-width: 0
}

.workspace .tabs {
    /*display: flex;*/
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 10px 12px;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 4;
    align-items: center;
    border-bottom: 1px solid var(--border)
}

.workspace .tab-btn {
    white-space: nowrap;
    flex: none;
    padding: 9px 12px;
    font-size: 11px;
    min-height: 36px;
    border-radius: 8px;
    gap: 5px;
    flex-wrap: nowrap
}

.workspace .tab-badge {
    font-size: 9px;
    padding: 2px 5px;
    min-width: 17px
}

.workspace .tab-content {
    padding: 20px
}

.workspace .card {
    box-shadow: none;
    border-radius: 12px
}

.workspace .score-overview {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    gap: 22px
}

.workspace .score-circle {
    width: 100px;
    height: 100px;
    flex-shrink: 0
}

.workspace .score-circle > span {
    font-size: 23px
}

.workspace .bar-label {
    font-size: 11px
}

.workspace #indexability-alert {
    background: var(--surface);
    font-size: 11px !important
}

.workspace .overview-alerts {
    background: var(--warning-light);
    font-size: 11px;
    gap: 10px;
    padding: 16px
}

.workspace .overview-alerts button {
    line-height: 1.6;
    text-decoration: none
}

.workspace .overview-alerts button:hover {
    text-decoration: underline
}

#smartActionHost:empty {
    display: none
}

#smartActionHost .smart-actions {
    margin: 0 0 16px;
    display: grid;
    gap: 8px
}

#smartActionHost .smart-card {
    margin: 0;
    padding: 12px 14px;
    gap: 12px;
    border-radius: 10px;
    box-shadow: none
}

#smartActionHost .smart-card h4 {
    font-size: 12px;
    margin: 0;
    line-height: 1.6
}

#smartActionHost .smart-card p {
    font-size: 11px;
    margin: 4px 0 0;
    line-height: 1.6
}

#smartActionHost .smart-card a, #smartActionHost .smart-card button {
    font: 600 11px/1.5 var(--font);
    padding: 8px 10px;
    border-radius: 7px;
    white-space: nowrap
}

#smartActionHost nav {
    font-size: 11px;
    text-align: right
}

#smartActionHost nav a {
    color: var(--primary);
    text-decoration: none
}

.heading-summary {
    gap: 10px
}

.heading-summary .h-stat {
    padding: 16px 8px;
    box-shadow: none;
    background: var(--surface)
}

.heading-summary .h-stat h3 {
    font-size: 26px
}

.heading-summary .h-stat p {
    font-size: 10px
}

.image-toolbar {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 14px
}

.image-toolbar button {
    font-size: 11px;
    padding: 8px 12px
}

.audit-image-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-bottom: 0;
    background: var(--surface)
}

.audit-image-row:first-child {
    border-radius: 12px 12px 0 0
}

.audit-image-row:last-child {
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 12px 12px
}

.audit-image-thumb {
    width: 68px;
    height: 68px;
    border-radius: 9px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden
}

.audit-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.audit-image-info {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 6px
}

.audit-image-info strong {
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere
}

.audit-image-info > a {
    font-size: 11px;
    color: var(--primary);
    overflow-wrap: anywhere;
    line-height: 1.6;
    text-decoration: none
}

.audit-image-info > a:hover {
    text-decoration: underline
}

.audit-image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 10px;
    color: var(--text-sec);
    overflow-wrap: anywhere
}

.image-heavy {
    color: #af6412;
    font-weight: 700
}

.image-alt-missing {
    color: var(--danger)
}

.audit-image-row > button {
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px;
    color: var(--primary);
    background: var(--surface);
    font-size: 10px;
    cursor: pointer;
    flex: none
}

.image-empty {
    background: var(--surface);
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-sec);
    font-size: 12px;
    text-align: center
}

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

@keyframes auditGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 #347cf518
    }
    50% {
        box-shadow: 0 0 0 5px #347cf508
    }
}

.audit-search-area {
    animation: auditAppear .45s ease both
}

.tool-intro-grid > div {
    animation: auditAppear .5s ease both
}

.tool-intro-grid > div:nth-child(2) {
    animation-delay: .08s
}

.tool-intro-grid > div:nth-child(3) {
    animation-delay: .16s
}

body:not(.has-audit) #btnAnalyze {
    animation: auditGlow 3s ease-in-out 3
}

.tab-content.active {
    animation: auditAppear .25s ease both
}

.audit-image-row {
    transition: background .2s
}

.audit-image-row:hover {
    background: var(--primary-light)
}

@media (min-width: 1800px) {
    .workspace {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border)
    }
}

@media (max-width: 1050px) and (min-width: 761px) {
    .workspace .sidebar {
        width: 55%
    }

    .workspace .tab-content {
        padding: 14px
    }

    .audit-image-row {
        flex-wrap: wrap
    }

    .audit-image-row > button {
        margin-left: 82px
    }

    .workspace .score-overview {
        gap: 12px;
        padding: 14px
    }
}

@media (max-width: 760px) {
    .audit-search-heading {
        text-align: left;
        margin-bottom: 16px
    }

    .audit-search-heading h2 {
        font-size: 23px
    }

    .audit-search-area {
        margin-top: 18px
    }

    .tool-intro {
        padding: 24px 16px 32px
    }

    .tool-intro h1 {
        font-size: 27px
    }

    .tool-intro-grid {
        grid-template-columns:1fr;
        gap: 10px;
        margin-top: 20px
    }

    .tool-intro-grid > div {
        padding: 18px
    }

    .workspace {
        max-width: 100%;
        overflow: visible
    }

    .workspace .sidebar {
        width: 100%;
        overflow: visible
    }

    .workspace .preview-panel {
        width: 100%
    }

    .workspace .tabs {
        top: 0;
        padding: 8px
    }

    .workspace .tab-content {
        padding: 14px
    }

    .has-audit .audit-header .search-wrap {
        flex-direction: row;
        gap: 6px
    }

    .has-audit .audit-header .search-wrap input {
        font-size: 14px;
        padding: 11px;
        width: 0
    }

    .has-audit .audit-header #btnAnalyze {
        width: auto;
        font-size: 11px;
        padding: 10px;
        max-width: 130px
    }

    .has-audit .audit-header-actions .tool-back {
        display: none
    }

    .audit-image-row {
        gap: 10px;
        align-items: flex-start;
        padding: 12px;
        flex-wrap: wrap
    }

    .audit-image-thumb {
        width: 52px;
        height: 52px
    }

    .audit-image-row > button {
        margin-left: 62px
    }

    .audit-image-info {
        min-width: calc(100% - 72px)
    }

    #smartActionHost .smart-card {
        flex-direction: column;
        align-items: flex-start
    }

    #smartActionHost .smart-card a, #smartActionHost .smart-card button {
        align-self: flex-end
    }

    .workspace .score-circle {
        width: 84px;
        height: 84px
    }

    .workspace .score-circle > span {
        font-size: 28px
    }
}

@media (prefers-reduced-motion: reduce) {
    .audit-search-area, .tool-intro-grid > div, body:not(.has-audit) #btnAnalyze, .tab-content.active {
        animation: none
    }

    .tool-intro-grid > div, .audit-image-row {
        transition: none
    }
}

.audit-coverage {
    margin-top: 22px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px
}

.audit-coverage-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px
}

.audit-coverage-heading strong {
    font-size: 13px
}

.audit-coverage-heading > span {
    font-size: 11px;
    color: var(--text-sec)
}

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

.audit-coverage-grid article {
    display: flex;
    align-items: flex-start;
    gap: 10px
}

.audit-coverage-grid article > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700
}

.audit-coverage-grid b {
    font-size: 12px
}

.audit-coverage-grid p {
    font-size: 11px;
    line-height: 1.7;
    margin-top: 4px
}

.audit-header #btnAnalyze:disabled {
    cursor: wait;
    opacity: .7
}

@media (max-width: 760px) {
    .audit-coverage-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px
    }

    .audit-coverage-grid {
        grid-template-columns:1fr;
        gap: 16px
    }

    .audit-coverage {
        padding: 18px
    }
}

                            .seo-modal {
                                border: 1px solid #d6e4fb;
                                border-radius: 18px;
                                padding: 0;
                                max-width: 490px;
                                width: calc(100% - 30px);
                                background: #fff;
                                color: #1e3352;
                                box-shadow: 0 30px 90px #0a255765;
                                margin: auto;
                                font-family: 'Plus Jakarta Sans', sans-serif
                            }

.seo-modal::backdrop {
    background: rgba(13, 35, 73, .58);
    backdrop-filter: blur(5px)
}

.seo-modal-head {
    padding: 23px 26px 13px
}

.seo-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #e5efff;
    display: grid;
    place-items: center;
    font-size: 21px;
    color: #3176ed;
    margin-bottom: 14px
}

.seo-modal h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.5px
}

.seo-modal p {
    color: #6c7d96;
    font-size: 13px;
    line-height: 1.8;
    margin: 10px 0
}

.seo-url-choice {
    margin: 0 26px;
    padding: 14px;
    border: 1px solid #e2ebfa;
    border-radius: 10px;
    background: #f8faff;
    overflow-wrap: anywhere;
    color: #2b5ead;
    font-size: 12px;
    font-weight: 700
}

.seo-modal-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 22px 26px
}

.seo-modal-buttons button, .seo-modal-buttons a {
    border-radius: 9px;
    padding: 11px 14px;
    border: 1px solid #d9e5f7;
    background: #fff;
    font: 700 12px 'Plus Jakarta Sans', sans-serif;
    color: #627490;
    cursor: pointer;
    text-decoration: none
}

.seo-modal-buttons .primary {
    background: #347cf5;
    color: white;
    border-color: #347cf5
}

.seo-toast {
    position: fixed;
    right: 19px;
    bottom: 19px;
    max-width: 420px;
    background: #153257;
    color: white;
    box-shadow: 0 14px 45px #06214b5c;
    border-radius: 11px;
    padding: 14px 19px;
    z-index: 3000;
    font: 600 13px/1.7 'Plus Jakarta Sans', sans-serif;
    transition: transform .3s, opacity .3s
}

.seo-toast[hidden] {
    display: none
}

.seo-fade-in {
    animation: seoFaded .2s ease
}

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

                            .scan-error-banner {
                                flex-shrink: 0;
                                margin: 10px 18px;
                                border: 1px solid #f0c7c7;
                                background: #fff4f3;
                                color: #822d2d;
                                padding: 13px 16px;
                                border-radius: 12px;
                                box-shadow: 0 6px 20px rgba(142, 44, 52, .07);
                                display: flex;
                                align-items: flex-start;
                                gap: 10px;
                            }

.scan-error-banner[hidden] {
    display: none !important;
}

.scan-error-banner .scan-error-main {
    flex: 1;
    min-width: 0;
}

.scan-error-banner strong {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
}

.scan-error-banner p {
    margin: 3px 0 0;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.scan-error-banner button {
    font-size: 20px;
    border: 0;
    color: #822d2d;
    background: none;
    cursor: pointer;
    line-height: 1;
}

body.dark-mode .scan-error-banner {
    background: #41202b;
    border-color: #7e4550;
    color: #ffe2df;
}

body.dark-mode .scan-error-banner button {
    color: #ffe2df;
}

 .article-seo-card {
     padding: 24px;
     border: 1px solid #e3eafa;
     background: linear-gradient(145deg, #fff, #f6f9ff);
     border-radius: 18px;
     box-shadow: 0 12px 36px #1e428008;
     animation: seoFade .32s ease-out
 }

.article-seo-card h2 {
    font-size: 20px;
    letter-spacing: -.5px;
    margin: 6px 0
}

.article-seo-card p {
    color: #6b7d9c;
    font-size: 12px;
    line-height: 1.75
}

.article-seo-eyebrow {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #347cf5;
    font-weight: 800
}

.article-seo-card label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin: 17px 0 7px
}

.article-seo-card input, .article-seo-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dce5f4;
    border-radius: 11px;
    background: #fff;
    padding: 12px;
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s
}

.article-seo-card input:focus, .article-seo-card textarea:focus {
    border-color: #347cf5;
    box-shadow: 0 0 0 3px #347cf51a
}

.article-seo-submit {
    width: 100%;
    margin-top: 15px;
    border: 0;
    border-radius: 11px;
    padding: 13px;
    background: linear-gradient(110deg, #2767ed, #4b8df9);
    color: white;
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s
}

.article-seo-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px #347cf52c
}

.article-seo-submit:disabled {
    opacity: .65;
    cursor: wait
}

.article-result-score {
    font-size: 19px;
    font-weight: 800;
    color: #1d4fba;
    margin: 24px 0 8px
}

.article-term, .article-issue {
    background: white;
    border: 1px solid #e4eaf4;
    border-radius: 11px;
    padding: 12px;
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.7
}

.article-issue {
    border-left: 3px solid #f59e0b
}

.article-issue p {
    margin: 4px 0 0
}

.tab-content.active {
    animation: seoFade .28s ease-out
}

.tab-btn, .btn-fix {
    transition: background-color .2s, color .2s, transform .2s
}

.tab-btn:hover {
    transform: translateY(-1px)
}

@keyframes seoFade {
    from {
        opacity: .6;
        transform: translateY(5px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media (prefers-reduced-motion: reduce) {
    .tab-content.active, .article-seo-card {
        animation: none
    }

    .tab-btn, .article-seo-submit {
        transition: none
    }
}
/* Compact analysis controls below the URL field. */
.audit-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    text-align: left;
}
.audit-device { border: 0; padding: 0; margin: 0; min-width: 0; }
.audit-device legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.audit-device-buttons { display: flex; gap: 4px; }
.audit-device-button { position: relative; cursor: pointer; }
.audit-device-button input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.audit-device-button span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-sec);
    background: var(--bg);
    font-size: 12px;
    font-weight: 600;
}
.audit-device-button svg { width: 14px; height: 14px; }
.audit-device-button input:checked + span { color: var(--primary); border-color: var(--primary); background: var(--primary-light, #347cf514); }
.audit-device-button input:focus-visible + span { outline: 3px solid #80b1fa; outline-offset: 3px; }
.audit-device-button:hover span { border-color: var(--primary); }
.audit-compare { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; color: var(--text-sec); }
.audit-compare input { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); flex: none; }
.audit-link-mode { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.audit-link-mode > span { font-size: 12px; color: var(--text-sec); white-space: nowrap; }
.audit-link-mode select { width: 100%; min-width: 0; min-height: 28px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-main); font: inherit; font-size: 12px; }
@media (max-width: 760px) {
    .audit-settings { padding: 6px 8px; gap: 6px 10px; }
    .audit-compare { flex: 1; font-size: 11px; }
    .audit-link-mode { width: 100%; margin-left: 0; }
    .audit-link-mode select { flex: 1; }
}

.workspace-resizer { display: none; }
@media (min-width: 761px) {
    .workspace .sidebar { width: var(--sidebar-width, 32%); flex: 0 0 var(--sidebar-width, 32%); }
    .workspace-resizer {
        display: block;
        flex: 0 0 10px;
        cursor: col-resize;
        touch-action: none;
        background: var(--surface);
        position: relative;
        border-inline: 1px solid var(--border);
    }
    .workspace-resizer::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 3px;
        width: 2px;
        height: 36px;
        border-radius: 2px;
        background: var(--text-sec);
    }
    .workspace-resizer:hover, .workspace-resizer:focus-visible, .is-resizing .workspace-resizer { background: var(--primary-light, #347cf514); }
    .workspace-resizer:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
    .workspace.is-resizing { user-select: none; cursor: col-resize; }
    .workspace.is-resizing iframe { pointer-events: none; }
}

#clearAuditUrlSuggestions { background:transparent; border:0; padding:4px 0; color:var(--text-sec); font:inherit; font-size:12px; text-decoration:underline; cursor:pointer; }

/* Keep the original two-pane loading layout; prevent the left mask scrolling away. */
body.is-scanning #auditSidebar { overflow: hidden; overscroll-behavior: none; }
