:root {
    --globe-bg: #0f172a;
    --drawer-bg: #1e293b;
    --drawer-width: 400px;
    --accent-pulse: #3b82f6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --focus-ring: #3b82f6;
}

[data-theme="light"] body {
    --globe-bg: #f8fafc;
}

[data-theme="light"] #globe-timestamp {
    background: rgba(255, 255, 255, 0.8);
    color: #334155;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .globe-timestamp:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
}

[data-theme="light"] .side-drawer {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .drawer-title {
    color: #1a202c;
}

[data-theme="light"] .drawer-close {
    color: #64748b;
}

[data-theme="light"] .drawer-close:hover {
    color: #1a202c;
}

[data-theme="light"] .drawer-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .drawer-card:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .drawer-card h3 a {
    color: #1a202c;
}

[data-theme="light"] .drawer-card p,
[data-theme="light"] .summary-text {
    color: #475569;
}

[data-theme="light"] .meta-source {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .volume-legend {
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
}

[data-theme="light"] .volume-legend h4 {
    color: #1a202c;
}

[data-theme="light"] .globe-nav-link {
    color: #334155;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .globe-nav-link:hover {
    color: #1a202c;
    background: rgba(255, 255, 255, 1);
}

[data-theme="light"] .drawer-card .meta {
    color: #64748b;
}

/* --- Accessibility Utilities --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-pulse);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus indicators for keyboard navigation */
#globe-container:focus,
.drawer-close:focus,
.drawer-card a:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* --- Loading State --- */
.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 5;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-pulse);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin: 0;
}

/* --- Error State --- */
.globe-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 2rem;
    background: rgba(30, 41, 59, 0.9);
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    max-width: 400px;
    z-index: 5;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.globe-error h2 {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.globe-error p {
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.retry-button {
    background: var(--accent-pulse);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.retry-button:hover {
    background: #2563eb;
}

.retry-button:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* --- Toast Notification --- */
.globe-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.globe-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.globe-toast.error {
    border-left: 4px solid #ef4444;
}

.globe-toast.success {
    border-left: 4px solid #22c55e;
}

/* --- Skeleton Loading Animation --- */
.drawer-card.skeleton {
    pointer-events: none;
}

.skeleton-title {
    height: 1.2rem;
    width: 70%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-meta {
    height: 0.8rem;
    width: 40%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-text {
    height: 0.9rem;
    width: 90%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

/* --- Volume Legend --- */
.volume-legend {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Inter', sans-serif;
    z-index: 10;
}

.volume-legend h4 {
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-color.high {
    background: #ef4444;
}

.legend-color.medium {
    background: #f59e0b;
}

.legend-color.low {
    background: #22c55e;
}

.legend-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* --- Logo Overlay --- */
#globe-logo-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
    /* Let clicks pass through */
}

/* --- Timestamp Display --- */
.globe-timestamp {
    position: fixed;
    top: 2rem;
    right: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    transition: all 0.3s ease;
}

.globe-timestamp:hover {
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.globe-timestamp::before {
    content: '🔄';
    margin-right: 0.5rem;
    opacity: 0.7;
}

#globe-logo-container img {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

#globe-logo-container .brand-text {
    display: flex;
    flex-direction: column;
}

#globe-logo-container h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
}

#globe-logo-container .subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}


body {
    background-color: var(--globe-bg);
    overflow: hidden;
    /* Prevent scrolling when drawer is closed */
}

/* --- Container --- */
#globe-container {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: #0f172a;
    background-image:
        radial-gradient(circle, rgba(30, 41, 59, 0.5) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.8) 100%);
    background-size: 30px 30px, 100% 100%;
    cursor: grab;
}

#globe-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vh;
    height: 90vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

#globe-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.atmosphere-ring {
    filter: url(#atmosphereBlur);
}

#globe-container:active {
    cursor: grabbing;
}

/* --- Globe Navigation --- */
.globe-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    font-family: 'Inter', sans-serif;
}

.globe-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.globe-nav-link:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

.globe-nav-link:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* --- Beacons (D3 SVG Elements) --- */
.location-marker {
    fill: var(--accent-pulse);
    fill-opacity: 0.6;
    stroke: #fff;
    stroke-width: 1px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.location-marker:hover {
    fill-opacity: 1;
    stroke-width: 2px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

.location-pulse {
    fill: none;
    stroke: var(--accent-pulse);
    stroke-width: 2px;
    stroke-opacity: 0.8;
    pointer-events: none;
    /* Let clicks pass through to the marker */
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        stroke-opacity: 1;
    }

    100% {
        transform: scale(2.5);
        stroke-opacity: 0;
    }
}

/* --- Tooltip --- */
.globe-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.85);
    /* Slightly darker for contrast */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    /* Explicit font */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    /* Ensure above everything else */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -120%);
}

/* --- Side Drawer --- */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--drawer-width);
    height: 100vh;
    background: rgba(30, 41, 59, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(20px);
    /* Heavy glass */
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    /* Edge definition */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 30;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Elegant spring-like ease */
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.025em;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.drawer-close:hover {
    color: var(--text-primary);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* --- Country Summary in Drawer --- */
.drawer-country-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.country-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.country-meta-sep {
    color: rgba(255, 255, 255, 0.2);
}

.country-volume-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.volume-badge {
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- News Cards in Drawer --- */
.drawer-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card entrance animation */
.drawer-card.card-entrance {
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.drawer-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Highlight breaking news cards */
.drawer-card[data-recency="breaking"] {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.drawer-card[data-recency="breaking"]:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Highlight recent news cards */
.drawer-card[data-recency="recent"] {
    border-left: 3px solid #f59e0b;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.drawer-card h3 {
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
}

.drawer-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.drawer-card h3 a:hover {
    color: var(--accent-pulse);
    transform: translateX(2px);
}

.drawer-card .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

    .drawer-card p {
        font-size: 0.9rem;
        color: #cbd5e1;
        line-height: 1.5;
        margin: 0;
    }

    .drawer-bookmark {
        width: 28px;
        height: 28px;
        border: none;
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: var(--text-secondary);
        flex-shrink: 0;
        margin-left: 0.5rem;
    }

    .drawer-bookmark:hover {
        color: var(--accent-pulse);
        background: rgba(59, 130, 246, 0.15);
    }

    .drawer-bookmark.saved {
        color: var(--accent-pulse);
    }

    [data-theme="light"] .drawer-bookmark {
        color: #64748b;
    }

    [data-theme="light"] .drawer-bookmark.saved {
        color: #3b82f6;
    }

/* --- Recency Badges --- */
.recency-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.recency-badge.breaking {
    background: #ef4444;
    color: white;
    animation: pulse-badge 2s infinite;
}

.recency-badge.recent {
    background: #f59e0b;
    color: white;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Tablet and below */
    #globe-logo-container h1 {
        font-size: 1.5rem;
    }

    #globe-logo-container .subtitle {
        font-size: 0.75rem;
    }

    .drawer-title {
        font-size: 1.25rem;
    }

    .drawer-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    /* Mobile */
    :root {
        --drawer-width: 100vw;
    }

    #globe-logo-container {
        top: 1rem;
    }

    #globe-logo-container img {
        width: 40px;
        height: 40px;
    }

    #globe-logo-container h1 {
        font-size: 1.25rem;
    }

    #globe-logo-container .subtitle {
        display: none; /* Hide subtitle on small screens */
    }

    .drawer-header {
        padding: 1rem;
    }

    .drawer-content {
        padding: 1rem;
    }

    .drawer-card {
        padding: 0.875rem;
    }

    /* Touch-friendly targets (minimum 44x44px) */
    .drawer-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .drawer-card h3 a {
        display: block;
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    /* Small mobile */
    .globe-tooltip {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        max-width: 200px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    /* Landscape orientation */
    #globe-logo-container {
        top: 1rem;
    }

    .drawer-content {
        padding: 1rem;
    }
}
/* ========================================
   Enhanced Story Card Styles
   ======================================== */

/* Card title with external link indicator */
.card-title {
    font-size: 1.15rem;
    margin: 0;
    flex: 1;
}

.card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-title a:hover {
    color: var(--accent-pulse);
    transform: translateX(2px);
}

.card-title a:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

/* External link icon */
.external-icon {
    font-size: 0.85em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.card-title a:hover .external-icon {
    opacity: 1;
}

/* Enhanced meta section */
.drawer-card .meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

/* Source attribution with icon */
.meta-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-weight: 500;
}

.source-icon {
    font-size: 0.9em;
}

/* Domain display */
.meta-domain {
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-style: italic;
}

/* Time display with tooltip support */
.meta-time {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.meta-time time {
    cursor: help;
    border-bottom: 1px dotted rgba(148, 163, 184, 0.3);
}

/* Reading time badge */
.meta-read-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Card summary section */
.card-summary {
    margin-top: 0.5rem;
}

.summary-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Keyboard Help Button
   ======================================== */

.keyboard-help-button {
    position: fixed;
    bottom: 60px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.keyboard-help-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.keyboard-help-button:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ========================================
   Keyboard Shortcuts Overlay
   ======================================== */

.keyboard-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.keyboard-help-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.keyboard-help-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.keyboard-help-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    color: #f8fafc;
}

.keyboard-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.keyboard-help-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
}

.keyboard-help-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.keyboard-help-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.keyboard-help-close:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.keyboard-help-body {
    padding: 1.5rem;
}

.shortcut-section {
    margin-bottom: 2rem;
}

.shortcut-section:last-child {
    margin-bottom: 0;
}

.shortcut-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.shortcut-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Inter', monospace;
    color: #f8fafc;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 24px;
    text-align: center;
}

.shortcut-item span {
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Responsive styles for keyboard help */
@media (max-width: 640px) {
    .keyboard-help-content {
        width: 95%;
        max-height: 90vh;
    }

    .keyboard-help-header h2 {
        font-size: 1.25rem;
    }

    .shortcut-item {
        flex-wrap: wrap;
    }
}

/* ========================================
   Reduced Motion Preferences (WCAG 2.3.3)
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .location-pulse {
        animation: none;
    }

    .recency-badge.breaking {
        animation: none;
    }

    .loading-spinner {
        animation: none;
    }

    .drawer-card.skeleton .skeleton-title,
    .drawer-card.skeleton .skeleton-meta,
    .drawer-card.skeleton .skeleton-text {
        animation: none;
    }

    .drawer-card.card-entrance {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .keyboard-help-overlay,
    .keyboard-help-button,
    .drawer-close,
    .location-marker,
    .drawer-card,
    .side-drawer {
        transition: none;
    }
}
