/*
 * A11y-SVG-Studio
 * Copyright (C) 2026 Mike Gifford and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
:root {
    --bg-body: #ffffff;
    --text-body: #1a1a1a;
    --primary: #005a9c;
    --primary-text: #ffffff;
    --border: #ced4da;
    --card-bg: #f8f9fa;
    --focus-ring: #005a9c;
    --error: #d32f2f;
    --success: #2e7d32;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #121212;
        --text-body: #e0e0e0;
        --primary: #90caf9;
        --primary-text: #000000;
        --border: #6e6e6e; /* raise contrast for borders in dark */
        --card-bg: #1e1e1e;
        --focus-ring: #90caf9;
        --error: #ef5350;
        --success: #66bb6a;
    }
}

/* Explicit theme overrides (manual toggle has priority) */
:root[data-theme="light"] {
    --bg-body: #ffffff;
    --text-body: #1a1a1a;
    --primary: #005a9c;
    --primary-text: #ffffff;    --primary-light: rgba(0, 90, 156, 0.1);    --border: #ced4da;
    --card-bg: #f8f9fa;
    --focus-ring: #005a9c;
    --error: #d32f2f;
    --success: #2e7d32;
}

:root[data-theme="dark"] {
    --bg-body: #121212;
    --text-body: #e0e0e0;
    --primary: #90caf9;
    --primary-text: #000000;
    --border: #6e6e6e; /* ensure ≥3:1 against #121212 */
    --card-bg: #1e1e1e;
    --focus-ring: #90caf9;
    --error: #ef5350;
    --success: #66bb6a;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.1rem;
    margin: 0;
}

header p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.theme-control {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.theme-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-body);
    color: var(--text-body);
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}

/* Sidebar: Input & Controls */
.sidebar {
    width: 340px;
    background: var(--bg-body);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    gap: 1.5rem;
    flex-shrink: 0;
}

.sidebar-note {
    margin: 0;
    font-size: 0.85rem;
    color: #3c6f44;
}

.input-card {
    border: 1px solid #2e7d32;
    background: #e8f5e9;
    border-radius: 8px;
    padding: 0.75rem;
}

.dropzone {
    margin-top: 0.5rem;
    border: 2px dashed #2e7d32;
    background: rgba(46, 125, 50, 0.08);
    color: #1b5e20;
    border-radius: 8px;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.dropzone:hover {
    border-color: #1b5e20;
    background: rgba(46, 125, 50, 0.15);
}

.dropzone-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dropzone-hint {
    font-size: 0.85rem;
    color: #1b5e20;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.intent-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--card-bg);
}

/* Accessibility Intent status backgrounds */
.intent-card.status-yellow {
    background: #fff8e1; /* light yellow */
    border-color: #fbc02d;
}
.intent-card.status-red {
    background: #fdecea; /* light red */
    border-color: #f44336;
}
.intent-card.status-green {
    background: #e8f5e9; /* light green */
    border-color: #2e7d32;
}

.intent-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.meta-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.meta-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.meta-field input,
.meta-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem;
    font-family: var(--editor-font, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, monospace);
    font-size: 0.9rem;
    background: #0f1115;
    color: #f8f8f2;
}

.meta-field textarea {
    resize: vertical;
    min-height: 60px;
}

.meta-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #8a6d3b;
}

.meta-hint.warning {
    color: #b94a48;
}

/* Sidebar resizer (between sidebar and main content) */
.sidebar-resizer {
    width: 8px;
    cursor: col-resize;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.06) 50%, transparent 100%);
    flex-shrink: 0;
    z-index: 40;
}

.editor-resizer {
    height: 8px;
    cursor: row-resize;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 50%, transparent 100%);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
}

/* Compact Input */
textarea#svg-code {
    min-height: 120px;
    font-family: monospace;
    font-size: 0.8rem;
    resize: vertical;
}

/* Main Content: Previews */
.main-content {
    flex: 1;
    background: #e9ecef; /* Neutral grey for contrast */
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    overflow-y: auto;
    min-height: 0;
}

@media (prefers-color-scheme: dark) {
    .main-content { background: #000; }
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
    min-height: 200px;
    position: relative;
}

.preview-pane {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.preview-pane:first-child {
    border-radius: 8px 0 0 8px;
}

.preview-pane:last-child {
    border-radius: 0 8px 8px 0;
}

/* Resizer handle between preview panes */

.preview-resizer {
    position: absolute;
    top: 0;
    width: 16px;
    height: 100%;
    transform: translateX(-50%);
    cursor: col-resize;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.12) 50%, transparent 100%);
    z-index: 20;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-resizer::before {
    content: '';
    width: 3px;
    height: 48px;
    background: var(--border);
    border-radius: 2px;
    box-shadow: 0 0 0 4px transparent;
    transition: box-shadow .12s, background .12s;
}

.preview-resizer:hover::before {
    box-shadow: 0 0 0 6px rgba(0,90,156,0.08);
    background: #005a9c;
}

@media (prefers-color-scheme: dark) {
    .preview-resizer:hover {
        background: linear-gradient(90deg, transparent 0%, #90caf9 50%, transparent 100%);
    }
}

.preview-header {
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: var(--bg-body);
    text-align: center;
}

.preview-viewport {
    flex: 1;
    padding: 1rem;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-viewport svg {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

.preview-viewport.preview-light { background-color: #ffffff !important; color: #000000 !important; }
.preview-viewport.preview-dark { background-color: #121212 !important; color: #ffffff !important; }

/* Intent Status Widget */
.intent-widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.intent-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.decorative { background: #f1c40f; }
.status-dot.informational { background: #3498db; }
.status-dot.interactive { background: #e74c3c; }
.status-dot.error { background: #e74c3c; }

button.icon-btn {
    padding: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-body);
}

/* Code Output Area */
.code-output-section {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 150px; 
    flex-shrink: 0;
}
.code-output-header {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
}
.code-content {
    flex: 1;
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.8rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}

/* Shared */
button {
    background-color: var(--primary);
    color: var(--primary-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
}

button.secondary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--text-body);
}

button.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.btn-group { display: flex; gap: 0.5rem; }

.contrast-badge {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    min-width: 2.5rem;
    text-align: center;
}
.pass { background-color: var(--success); color: white; }
.fail { background-color: var(--error); color: white; }
.aa { background-color: #1976d2; color: white; }
.aaa { background-color: #00897b; color: white; }

dialog {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-body);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
dialog h3 { margin-top: 0; }

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }

.color-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-body);
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
}

.color-item.text-color {
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
}

.text-badge {
    font-size: 0.65rem;
    background: #222;
    color: #fff;
    padding: 0.08rem 0.3rem;
    border-radius: 3px;
    margin-left: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Lint panel styles: fixed header, scrollable list */
.lint-panel {
    margin-top: 0.5rem;
    padding: 0.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.lint-panel .lint-header {
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.lint-panel {
    --lint-list-max: clamp(320px, 45vh, 560px);
}
.lint-panel {
    /* Cap overall height but let inner list handle scrolling for consistent focus behaviour */
    max-height: var(--lint-list-max);
    overflow: hidden;
    box-sizing: border-box;
}
.lint-title { font-weight: 600; }
.lint-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-body);
    line-height: 1;
    padding: 0.1rem 0.35rem;
}
.lint-close:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.lint-panel .lint-list {
    flex: 1 1 auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem 0.5rem 0.5rem 0.5rem;
    border-top: 1px dashed var(--border);
}
.lint-item { display:flex; justify-content:space-between; align-items:center; padding:0.35rem 0; }
.lint-message { color: var(--text-body); font-size: 0.95rem; flex:1; }
.lint-action { display:flex; align-items:center; gap:0.5rem; margin-left:0.6rem; }
.lint-action .lint-count {
    font-size: 0.75rem;
    color: var(--text-body);
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.lint-action .suggest { font-size:0.82rem; color:#444; }

/* Scrollbar styling (WebKit) */
.lint-panel .lint-list::-webkit-scrollbar { width: 12px; height: 12px; }
.lint-panel .lint-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
.lint-panel .lint-list::-webkit-scrollbar-track { background: transparent; }

/* Firefox scrollbar */
@supports (scrollbar-width: thin) {
    .lint-panel .lint-list { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.12) transparent; }
}

.lint-indicator {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: #f6c343;
    color: #3b2e02;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 200;
}
.lint-indicator.open {
    background: #f0b429;
}
.lint-indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.lint-indicator-text { font-size: 0.85rem; }

/* Accordion controls in sidebar */
.accordion {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    overflow: hidden;
}
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    gap: 0.5rem;
}
.accordion-content {
    padding: 0.5rem;
    border-top: 1px solid var(--border);
    display: none;
}
.accordion[aria-expanded="true"] .accordion-content { display: block; }

.accordion .chev { transition: transform 0.12s ease; }
.accordion[aria-expanded="true"] .chev { transform: rotate(90deg); }

/* Bottom editor beneath previews for live-edit of optimized SVG */
.bottom-editor {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 240px;
    height: 70vh;
    max-height: 85vh;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.bottom-editor.large {
    height: 75vh;
}

.editor-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.editor-tab {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    color: var(--text-body);
    font-size: 0.95rem;
}

.editor-tab:last-child { border-right: none; }

.editor-tab.active {
    background: rgba(0, 90, 156, 0.08);
    color: var(--primary);
}

.editor-tab:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: -2px;
}

.tab-hint {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
}

.editor-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-body);
}

.code-panel {
    flex: 1;
    min-height: 0;
    background: #050505;
    color: #f8f8f2;
    display: flex;
    flex-direction: column;
}

.code-panel.raw-input-panel {
    background: var(--bg-body);
    color: var(--text-body);
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.raw-input-controls {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

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

.raw-input-actions {
    display: flex;
    gap: 0.4rem;
}

.raw-input-textarea {
    flex: 1;
    min-height: 180px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: var(--editor-font, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, monospace);
    font-size: 0.9rem;
    resize: vertical;
    background: #0f1115;
    color: #f8f8f2;
}

.raw-input-textarea:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.intent-widget.compact {
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
}

.loaded-file {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drag-hint {
    font-size: 0.8rem;
    color: #6c757d;
}

.editor-body > .code-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-body > .code-panel:first-child {
    border-top: none;
}

.code-panel.is-editable {
    display: flex;
}

.code-shell {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
}

.code-shell textarea {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    color: #f8f8f2;
    text-shadow: none;
    overflow: auto;
    background: transparent;
    font-family: var(--editor-font, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, monospace);
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 1rem;
    padding-bottom: 1.75rem;
    outline: none;
    caret-color: #00e0ff;
    tab-size: 2;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.code-panel.is-editable .code-shell textarea {
    caret-color: transparent;
}

.code-shell.read-only textarea {
    cursor: text;
    line-height: 1.25;
    padding-bottom: 1rem;
}

.code-shell textarea:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(0, 224, 255, 0.75), 0 0 0 2px rgba(0, 224, 255, 0.35);
    background-color: rgba(0, 224, 255, 0.08);
}

.custom-caret {
    position: absolute;
    width: 3px;
    background: #00e0ff;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    animation: caretBlink 1s steps(1) infinite;
}

.custom-caret.is-visible {
    opacity: 1;
}

@keyframes caretBlink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}



.editor-footnote {
    padding: 0.55rem 1rem;
    font-size: 0.75rem;
    color: #6c757d;
    border-top: 1px dashed var(--border);
    background: var(--card-bg);
}

.editor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--bg-body);
}

.chip-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.75rem;
    background: transparent;
    color: var(--text-body);
    cursor: pointer;
}

.chip.active {
    border-color: var(--primary);
    background: rgba(0, 90, 156, 0.12);
    color: var(--primary);
}

.color-item.is-highlighted {
    border-color: rgba(255, 152, 0, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.25);
}

/* Intent toggle styling */
.intent-toggle-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.intent-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.intent-option:hover {
    border-color: var(--primary);
    background: var(--bg-body);
}

.intent-option.selected {
    border-color: var(--primary);
    background: var(--primary-light, rgba(21, 101, 192, 0.1));
}

.intent-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.intent-option .intent-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.intent-option small {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    line-height: 1.3;
}

/* Resources list */
.resources-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resources-list li {
    padding: 0;
}

.resources-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.resources-list a:hover,
.resources-list a:focus {
    background: var(--card-bg);
    text-decoration: underline;
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Lint item type badges */
.lint-item[data-type="accessible-name"] {
    border-left: 4px solid var(--warning, #ff9800);
}

.lint-item[data-type="accessible-name"] .lint-message {
    font-weight: 500;
}