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

body {
    background: #e9eaef;
    color: #1a1a1a;
    font-family: 'Lexend', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem 7rem;
}

/* ── Header ─────────────────────────────────────────── */
.site-header { margin-bottom: 1.25rem; }

.back-link, .back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-size: 0.72rem;
    font-weight: 300;
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 0.3rem;
    padding: 0;
    transition: color 0.12s;
    text-align: left;
}
.back-link:hover, .back-btn:hover { color: #555; }

.site-name {
    font-family: 'Matemasie', sans-serif;
    font-size: 1.7rem;
    font-weight: 400;
    background: linear-gradient(
        120deg,
        #0a0a0a, #4a4a4a, #606060, #1c1c1c,
        #555, #111, #3a3a3a, #0a0a0a
    );
    background-size: 350% 350%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aurora 70s ease infinite;
    display: inline-block;
}

@keyframes aurora {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.article-title {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a1a;
    margin-bottom: 0.2rem;
}

.article-meta {
    font-size: 0.7rem;
    font-weight: 300;
    color: #aaa;
}

/* ── Tabs ───────────────────────────────────────────── */
.db-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #d8dae3;
}

.tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.4rem 0.9rem 0.4rem 0;
    font-family: 'Bagel Fat One', sans-serif;
    font-size: 0.72rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
}

.tab.active { color: #2a8a80; border-bottom-color: #2a8a80; }
.tab:hover:not(.active) { color: #555; }

/* ── Article list ───────────────────────────────────── */
.article-list { display: flex; flex-direction: column; }

.article-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #d8dae3;
    cursor: pointer;
    transition: opacity 0.12s;
}
.article-row:first-child { border-top: 1px solid #d8dae3; }
.article-row:hover { opacity: 0.6; }

.article-row-body { flex: 1; min-width: 0; }

.article-row-title {
    font-size: 0.82rem;
    font-weight: 400;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-row-meta {
    font-size: 0.68rem;
    font-weight: 300;
    color: #aaa;
}

.audio-badge {
    font-size: 0.65rem;
    font-weight: 300;
    color: #2a8a80;
    flex-shrink: 0;
    opacity: 0.7;
}

.no-audio-badge {
    font-size: 0.65rem;
    font-weight: 300;
    color: #ccc;
    flex-shrink: 0;
}

.loading {
    font-size: 0.78rem;
    font-weight: 300;
    color: #aaa;
    padding: 1rem 0;
}

/* ── Player status ──────────────────────────────────── */
.player-status {
    font-size: 0.82rem;
    font-weight: 300;
    color: #aaa;
    margin-top: 0.4rem;
}

/* ── Fixed player ───────────────────────────────────── */
.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #d8dae3;
    z-index: 100;
}

.scrubber-wrap {
    height: 3px;
    background: #e8eaf0;
    cursor: pointer;
    position: relative;
}

.scrubber-bar {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: #2a8a80;
    pointer-events: none;
    transition: width 0.25s linear;
}

.player-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.player-left { flex: 1; min-width: 0; }

.player-title {
    font-size: 0.75rem;
    font-weight: 400;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-time {
    font-size: 0.65rem;
    font-weight: 300;
    color: #aaa;
    margin-top: 0.1rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.ctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    color: #555;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background 0.1s;
}
.ctrl-btn:hover { background: #f0f1f5; }

.play-btn {
    font-size: 0.85rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
    border-radius: 50%;
    padding: 0;
}
.play-btn:hover { background: #333; }
.play-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 520px) {
    .page { padding: 0.75rem 1rem 7rem; }
    .player-inner { padding: 0.65rem 1rem; }
}
