@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --sidebar-bg: #2d1b69;
    --sidebar-hover: #3a2580;
    --sidebar-active: #4a3299;
    --sidebar-text: #c4b5f0;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 220px;
    --header-height: 56px;
    --bauer-purple: #6c5ce7;
    --bauer-purple-dark: #5a4bd1;
    --bauer-accent: #e6007e;
    --bauer-accent-light: #ff2d9b;
    --bg-main: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --transition: all 0.15s ease;
    --cat-news: #3b82f6;
    --cat-sport: #10b981;
    --cat-politics: #8b5cf6;
    --cat-business: #f59e0b;
    --cat-weather: #06b6d4;
    --cat-crime: #ef4444;
    --cat-health: #ec4899;
    --cat-tech: #6366f1;
    --urgency-flash: #ef4444;
    --urgency-urgent: #f59e0b;
    --urgency-update: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand .brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-sub {
    color: var(--sidebar-text);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.nav-section-label {
    padding: 1rem 1.25rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.25);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 450;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-link:hover {
    color: var(--sidebar-text-active);
    background: var(--sidebar-hover);
}

.sidebar-link.active {
    color: var(--sidebar-text-active);
    background: var(--sidebar-active);
    border-left-color: var(--bauer-purple);
}

.sidebar-link .bi {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link .live-dot-sm {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-station {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--sidebar-text);
    font-size: 0.78rem;
    margin-bottom: 0.6rem;
}

.sidebar-station .station-icon {
    width: 30px;
    height: 30px;
    background: var(--bauer-purple);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.sidebar-station .station-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

.sidebar-station .station-role {
    font-size: 0.68rem;
    color: var(--sidebar-text);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.78rem;
    padding: 0.4rem 0;
    transition: var(--transition);
}

.sidebar-logout:hover { color: #ef4444; }

.main-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.top-header .page-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.top-header .header-clock {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.top-header .header-search {
    position: relative;
    width: 280px;
}

.top-header .header-search input {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    border-radius: 6px;
    padding: 0.4rem 0.75rem 0.4rem 2rem;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    transition: var(--transition);
}

.top-header .header-search input:focus {
    outline: none;
    border-color: var(--bauer-purple);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

.top-header .header-search .bi-search {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.25rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

.service-banner {
    background: linear-gradient(135deg, #fef3cd, #fff3cd);
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 500;
}

.service-banner .bi-exclamation-triangle-fill {
    margin-right: 0.4rem;
    color: #e6a817;
}

.service-banner .btn-close-banner {
    background: none;
    border: none;
    color: #856404;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    padding: 0;
    line-height: 1;
}

.service-banner .btn-close-banner:hover { opacity: 1; }

.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.wire-feed {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.wire-item {
    display: flex;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.wire-item:hover {
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.wire-time {
    width: 70px;
    flex-shrink: 0;
    padding: 0.85rem 0 0.85rem 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
    padding-right: 0.75rem;
}

.wire-indicator {
    width: 3px;
    flex-shrink: 0;
    background: transparent;
}

.wire-indicator.cat-news { background: var(--cat-news); }
.wire-indicator.cat-sport { background: var(--cat-sport); }
.wire-indicator.cat-politics { background: var(--cat-politics); }
.wire-indicator.cat-business { background: var(--cat-business); }
.wire-indicator.cat-weather { background: var(--cat-weather); }
.wire-indicator.cat-crime { background: var(--cat-crime); }
.wire-indicator.cat-health { background: var(--cat-health); }
.wire-indicator.cat-tech { background: var(--cat-tech); }

.wire-body {
    flex: 1;
    padding: 0.85rem 0.85rem 0.85rem 0.75rem;
    min-width: 0;
}

.wire-slug {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wire-slug .urgency-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    line-height: 1.4;
}

.urgency-flash {
    background: var(--urgency-flash);
    color: white;
}

.urgency-urgent {
    background: var(--urgency-urgent);
    color: white;
}

.urgency-update {
    background: var(--urgency-update);
    color: white;
}

.wire-preview {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wire-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.wire-cat-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: var(--bg-main);
    color: var(--text-secondary);
}

.wire-media-icons {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}

.wire-media-icons .bi {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.wire-media-icons .bi.has-media { color: var(--bauer-purple); }

.story-detail-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.story-detail-top {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.story-detail-top .story-slug {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.story-detail-top .story-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.story-detail-top .story-meta-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.story-audio-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.story-audio-bar .play-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.story-audio-bar audio {
    flex: 1;
    height: 36px;
}

.story-audio-bar .audio-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.story-script-body {
    padding: 1.5rem;
}

.story-script-body .script-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;   /* Keeps line breaks */
    word-break: normal;
}

.story-section {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.story-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.sidebar-card-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.sidebar-story-item {
    display: block;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    transition: background 0.1s ease;
}

.sidebar-story-item:last-child { border-bottom: none; }
.sidebar-story-item:hover { background: #f8fafc; }

.sidebar-story-item .sidebar-slug {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-primary);
}

.sidebar-story-item .sidebar-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bauer-purple);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--bauer-purple-dark);
    transform: scale(1.05);
}

.play-btn.playing {
    background: var(--bauer-accent);
}

.live-players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.live-player-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.live-player-card.irn2 {
    background: linear-gradient(135deg, #1a1a2e, #2d1b69);
}

.live-player-card.live-read {
    background: linear-gradient(135deg, #1a1a2e, #4a1942);
}

.live-player-card .live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.live-player-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.live-player-card .live-sub {
    font-size: 0.78rem;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.live-player-card audio {
    width: 100%;
    height: 40px;
    filter: invert(1) hue-rotate(180deg);
    opacity: 0.85;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    display: inline-block;
}

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

.bulletin-list {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.bulletin-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s ease;
}

.bulletin-item:last-child { border-bottom: none; }
.bulletin-item:hover { background: #f8fafc; }

.bulletin-item .play-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.bulletin-item .bulletin-info { flex: 1; }

.bulletin-item .bulletin-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bulletin-item .bulletin-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.bulletin-item audio {
    width: 200px;
    height: 32px;
    flex-shrink: 0;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.content-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.content-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.search-bar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
}

.search-bar-card .form-control,
.search-bar-card .form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    padding: 0.5rem 0.75rem;
}

.search-bar-card .form-control:focus,
.search-bar-card .form-select:focus {
    border-color: var(--bauer-purple);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.filter-pill {
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    background: white;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--bauer-purple);
    color: white;
    border-color: var(--bauer-purple);
}

.admin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.admin-card-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card-body { padding: 0; }

.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    gap: 0.5rem;
}

.user-row:last-child { border-bottom: none; }

.user-info { flex: 1; min-width: 180px; }

.user-info .station {
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info .username {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.toggle-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    background: white;
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: var(--bauer-purple);
    color: white;
    border-color: var(--bauer-purple);
}

.toggle-btn.danger { border-color: #ef4444; color: #ef4444; }
.toggle-btn.danger.active { background: #ef4444; color: white; }

.form-control, .form-select {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--bauer-purple);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}

.form-label {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.btn-primary {
    background: var(--bauer-purple);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

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

.btn-outline-primary {
    color: var(--bauer-purple);
    border-color: var(--bauer-purple);
    border-radius: 6px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
}

.btn-outline-primary:hover {
    background: var(--bauer-purple);
    border-color: var(--bauer-purple);
    color: white;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-bg);
    padding: 1rem;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card .logo { margin-bottom: 1.5rem; }

.login-card .logo img { height: 36px; }

.login-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state .bi {
    font-size: 2.5rem;
    color: var(--border-color);
    margin-bottom: 0.75rem;
}

.empty-state h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.empty-state p { font-size: 0.82rem; }

.video-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-wrapper video { width: 100%; display: block; }

.alert {
    border-radius: 6px;
    font-size: 0.82rem;
    border: none;
    padding: 0.6rem 1rem;
}

.alert-danger { background: rgba(239,68,68,0.08); color: #dc2626; }
.alert-success { background: rgba(16,185,129,0.08); color: #059669; }
.alert-info { background: rgba(108,92,231,0.08); color: var(--bauer-purple); }
.alert-warning { background: rgba(245,158,11,0.08); color: #92400e; }

.ai-tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.ai-tool-card:hover { box-shadow: var(--shadow-md); }

.ai-tool-card .icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(108,92,231,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    color: var(--bauer-purple);
}

.ai-tool-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.35rem; }
.ai-tool-card p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 1rem; }

.badge-coming-soon {
    background: var(--bauer-purple);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.contact-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-card .contact-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-card .contact-item strong {
    color: var(--text-primary);
}

.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.story-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.story-card:hover { box-shadow: var(--shadow-md); }

.story-card .category-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-main);
    color: var(--text-secondary);
}

.story-card .headline {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
    line-height: 1.35;
}

.story-card .headline a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.story-card .headline a:hover { color: var(--bauer-purple); }

.story-card .meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.audio-player-wrapper {
    background: #f8fafc;
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.audio-player-wrapper audio {
    width: 100%;
    height: 36px;
}

.media-badges {
    display: flex;
    gap: 0.35rem;
}

.media-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

.slug-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bauer-purple);
    text-decoration: none;
    margin-left: 0.4rem;
    transition: var(--transition);
}

.slug-link:hover { color: var(--bauer-accent); text-decoration: underline; }

.script-content {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.7;
    border-left: 3px solid var(--bauer-purple);
}

.script-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.script-toggle:hover { border-color: var(--bauer-purple); color: var(--bauer-purple); }

.header-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.ai-tools-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
}

.ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

.ai-action-btn:hover {
    border-color: var(--bauer-purple);
    color: var(--bauer-purple);
    background: rgba(108,92,231,0.04);
}

.ai-action-btn.ai-summary-btn:hover {
    border-color: var(--bauer-accent);
    color: var(--bauer-accent);
    background: rgba(230,0,126,0.04);
}

.ai-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-action-btn .spinner-border {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.ai-result-panel {
    border-bottom: 1px solid var(--border-light);
    background: #f8fafc;
}

.ai-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--bauer-purple);
}

.ai-result-header .bi {
    margin-right: 0.3rem;
}

.ai-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

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

.ai-result-body {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .mobile-overlay.show {
        display: block;
    }

    .main-area {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .top-header .header-search {
        display: none;
    }

    .live-players-grid {
        grid-template-columns: 1fr;
    }

    .bulletin-item {
        flex-direction: column;
        align-items: stretch;
    }

    .bulletin-item audio { width: 100%; }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .wire-time { width: 55px; font-size: 0.68rem; }
}

@media (max-width: 576px) {
    .main-content { padding: 1rem; }
    .page-header h1 { font-size: 1.15rem; }
}
/* =========================
   READABILITY IMPROVEMENTS
   ========================= */

body {
    font-size: 16px;
    line-height: 1.6;
}

.page-header h1 {
    font-size: 1.6rem;
}

.wire-slug {
    font-size: 0.95rem;
}

.wire-preview {
    font-size: 1rem;
    line-height: 1.6;
}

.story-card .headline {
    font-size: 1.1rem;
    line-height: 1.4;
}

.story-script-body .script-text {
    font-size: 1.05rem;
    line-height: 1.9;
}

.bulletin-item .bulletin-title {
    font-size: 1rem;
}
#waveform {
    width: 100%;
    margin: 1rem 0;
}

.play-btn {
    margin-top: 0.5rem;
}
.day-separator {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}