/*
#	Project: DevBlog / YtDevBlog - Developer changelog portal
#	This is NOT a freeware, use is subject to license terms.
#	Website: (injected by release brand)
#	Copyright (C) 2026 SupixSoft / Youtem. All Rights Reserved.
*/

/* Shared page atmosphere */
.dv-page {
    --dv-prose-width: 720px;
    position: relative;
    min-height: calc(100vh - 8rem);
}

.dv-page::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 280px;
    background:
        radial-gradient(ellipse 80% 60% at 10% -10%, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 0%, rgba(100, 116, 139, 0.1), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .dv-page::before {
    background:
        radial-gradient(ellipse 80% 60% at 10% -10%, rgba(96, 165, 250, 0.1), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 0%, rgba(148, 163, 184, 0.06), transparent 50%);
}

.dv-page > .container {
    position: relative;
    z-index: 1;
}

.dv-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    color: var(--dv-muted);
    margin-bottom: 1.25rem;
}

.dv-crumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dv-crumb-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dv-crumb a {
    color: var(--dv-muted);
    text-decoration: none;
}

.dv-crumb a:hover {
    color: var(--dv-accent);
}

.dv-crumb-sep {
    opacity: 0.45;
}

.dv-crumb-current {
    color: var(--dv-ink);
    font-weight: 500;
}

.dv-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, #475569 0%, #1e293b 100%);
    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cat-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-right: 0.3rem;
    background: #eef2ff;
    color: #3730a3;
}

.cat-Added { background: #dcfce7; color: #166534; }
.cat-Fixed { background: #ffedd5; color: #9a3412; }
.cat-Changed { background: #e0e7ff; color: #3730a3; }
.cat-Removed { background: #fee2e2; color: #991b1b; }
.cat-Security { background: #fce7f3; color: #9d174d; }

[data-theme="dark"] .cat-Added { background: rgba(22, 101, 52, 0.35); color: #86efac; }
[data-theme="dark"] .cat-Fixed { background: rgba(154, 52, 18, 0.35); color: #fdba74; }
[data-theme="dark"] .cat-Changed { background: rgba(55, 48, 163, 0.35); color: #c7d2fe; }
[data-theme="dark"] .cat-Removed { background: rgba(153, 27, 27, 0.35); color: #fca5a5; }
[data-theme="dark"] .cat-Security { background: rgba(157, 23, 77, 0.35); color: #f9a8d4; }
[data-theme="dark"] .cat-badge { background: rgba(99, 102, 241, 0.25); color: #c7d2fe; }

/* ========== Project list / timeline ========== */
.project-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 2rem;
    padding: 1.75rem 0 3.5rem;
}

@media (max-width: 960px) {
    .project-layout {
        display: block;
        padding-bottom: 2rem;
    }

    .project-cal-fab {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        position: fixed;
        left: 0;
        top: 48%;
        z-index: 95;
        width: 2.35rem;
        padding: 0.85rem 0.2rem;
        border: 1px solid var(--dv-border);
        border-left: 0;
        border-radius: 0 0.75rem 0.75rem 0;
        background: var(--dv-bg-elevated);
        color: var(--dv-ink);
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
        cursor: pointer;
        transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.15s ease;
    }

    .project-cal-fab i {
        font-size: 1.15rem;
        color: var(--dv-accent);
    }

    .project-cal-fab span {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 0.72rem;
        font-weight: 650;
        letter-spacing: 0.08em;
        line-height: 1;
    }

    .project-cal-fab:hover,
    .project-cal-fab:focus-visible {
        background: rgba(59, 130, 246, 0.08);
        outline: none;
    }

    body.project-cal-drawer-open .project-cal-fab {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-8px);
    }

    .project-cal-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        -webkit-backdrop-filter: blur(1px);
        backdrop-filter: blur(1px);
    }

    .project-cal-backdrop:not([hidden]) {
        opacity: 1;
        pointer-events: auto;
    }

    .project-cal-drawer {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(20.5rem, 88vw);
        z-index: 120;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
        background: transparent;
        box-shadow: none;
        pointer-events: none;
    }

    body.project-cal-drawer-open {
        overflow: hidden;
    }

    body.project-cal-drawer-open .project-cal-drawer {
        transform: translateX(0);
        pointer-events: auto;
    }

    .project-cal-drawer .calendar-box {
        position: static;
        min-height: 100%;
        border-radius: 0 14px 14px 0;
        border-left: 0;
        box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
    }

    .cal-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--dv-border);
    }
}

.project-hero {
    margin-bottom: 1.85rem;
}

.project-hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--dv-border);
    border-radius: 18px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.96) 55%, rgba(241, 245, 249, 0.9) 100%);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
    padding: 1.35rem 1.45rem 1.25rem;
}

.project-hero-panel.has-cover {
    display: flex;
    align-items: stretch;
    gap: 1.15rem;
}

.project-hero-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.project-hero-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--dv-accent), rgba(100, 116, 139, 0.35));
}

.project-hero-panel::after {
    content: "";
    position: absolute;
    right: -18%;
    top: -40%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 68%);
    pointer-events: none;
}

.project-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
}

.project-hero-mark {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    font-size: 1.55rem;
    background: linear-gradient(145deg, #334155 0%, #0f172a 100%);
    box-shadow:
        0 8px 18px rgba(15, 23, 42, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.project-hero-body {
    min-width: 0;
    flex: 1;
}

.project-hero-cover {
    position: relative;
    z-index: 1;
    flex: 0 0 13.5rem;
    width: 13.5rem;
    max-width: min(13.5rem, 34%);
    aspect-ratio: 16 / 9;
    align-self: center;
    border-radius: 0.75rem;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--dv-border);
    background: rgba(148, 163, 184, 0.12);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.project-hero-cover-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    cursor: zoom-in;
}

.project-hero-cover-hint {
    position: absolute;
    right: 0.4rem;
    bottom: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 0.95rem;
    pointer-events: none;
    opacity: 0.92;
}

.project-hero-cover:hover .project-hero-cover-hint {
    background: rgba(15, 23, 42, 0.78);
}

.viewer-container {
    z-index: 1085 !important;
}

.viewer-container.viewer-fixed {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 10050 !important;
    background-color: rgba(0, 0, 0, 0.72) !important;
}

.viewer-footer {
    text-align: center;
}



.project-hero h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.75rem, 2.8vw, 2.25rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    color: var(--dv-ink);
    line-height: 1.15;
}

.project-hero .desc {
    color: var(--dv-muted);
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
    max-width: 42rem;
}

.project-hero-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.project-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--dv-muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--dv-border);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
}

.project-chip i {
    font-size: 0.95rem;
    color: var(--dv-accent);
}

.project-chip a {
    color: inherit;
    text-decoration: none;
}

.project-chip a:hover {
    color: var(--dv-accent);
}

.project-chip.is-filter {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.35);
    color: var(--dv-accent);
}

.project-hero-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-hero-brief {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--dv-accent);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.project-hero-brief:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--dv-accent);
}

.project-hero-brief i {
    font-size: 1rem;
}

.project-hero-website-host {
    font-weight: 500;
    opacity: 0.78;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

[data-theme="dark"] .project-hero-cover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .project-hero-panel {
    background:
        linear-gradient(165deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .project-hero-panel::after {
    background: radial-gradient(circle, rgba(96, 165, 250, 0.14), transparent 68%);
}

[data-theme="dark"] .project-hero-footer {
    border-top-color: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .project-chip {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .project-hero-brief {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.28);
}

@media (max-width: 576px) {
    .project-hero-panel {
        padding: 1.15rem 1.1rem 1.05rem;
    }
    .project-hero-panel.has-cover {
        flex-direction: column;
        gap: 0.95rem;
    }
    .project-hero-main {
        gap: 0.85rem;
    }
    .project-hero-mark {
        width: 3rem;
        height: 3rem;
        font-size: 1.3rem;
        border-radius: 0.85rem;
    }
    .project-hero-cover {
        width: 100%;
        max-width: none;
        flex-basis: auto;
        align-self: stretch;
        order: -1;
    }
    .project-hero-footer {
        align-items: stretch;
    }
    .project-hero-links {
        width: 100%;
    }
    .project-hero-brief {
        justify-content: center;
        flex: 1 1 auto;
    }
}

.calendar-box {
    border: 1px solid var(--dv-border);
    border-radius: 16px;
    padding: 1.1rem 1.15rem 1.2rem;
    background: var(--dv-bg-elevated);
    position: sticky;
    top: 4.5rem;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.project-cal-drawer {
    min-width: 0;
}

.cal-drawer-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--dv-ink);
}

.cal-drawer-title i {
    color: var(--dv-accent);
    font-size: 1.1rem;
}

.cal-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--dv-border);
    border-radius: 0.5rem;
    background: var(--dv-bg);
    color: var(--dv-ink);
    cursor: pointer;
    line-height: 1;
}

.cal-drawer-close i {
    font-size: 1.25rem;
}

.cal-drawer-close:hover {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Desktop: hide drawer chrome; sidebar stays in-flow */
@media (min-width: 961px) {
    .project-cal-fab,
    .project-cal-backdrop,
    .cal-drawer-head {
        display: none !important;
    }
}

.calendar-box-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dv-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.85rem;
}

.calendar-box-title i {
    font-size: 1rem;
    color: var(--dv-accent);
}

.cal-side-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 0.95rem;
    padding: 0.28rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.04);
}

.cal-side-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    border: 0;
    background: transparent;
    color: var(--dv-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    padding: 0.45rem 0.35rem;
    border-radius: 0.55rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cal-side-tab i {
    font-size: 0.95rem;
}

.cal-side-tab:hover {
    color: var(--dv-ink);
}

.cal-side-tab.is-active {
    background: var(--dv-bg-elevated);
    color: var(--dv-accent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.cal-side-pane {
    display: none;
}

.cal-side-pane.is-active {
    display: block;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    color: var(--dv-ink);
}

.cal-nav-label {
    color: inherit;
    text-decoration: none;
}

.cal-nav-label:hover strong {
    color: var(--dv-accent);
}

.cal-nav strong {
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.month-row-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.month-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.65rem;
    border: 1px solid var(--dv-border);
    background: var(--dv-bg);
    color: var(--dv-ink);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.month-row:hover {
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--dv-accent);
}

.month-row.is-active {
    background: var(--dv-accent);
    border-color: var(--dv-accent);
    color: #fff;
}

.month-row-ym {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 400;
}

.month-row-ym i {
    font-size: 1rem;
    opacity: 0.9;
}

.month-row-count {
    font-size: 0.78rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
    min-width: 1.5rem;
    text-align: right;
}

.month-row-empty {
    margin: 0.35rem 0 0;
    color: var(--dv-muted);
    font-size: 0.82rem;
}

[data-theme="dark"] .cal-side-tabs {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .cal-side-tab.is-active {
    background: rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .month-row {
    background: rgba(255, 255, 255, 0.04);
}

.cal-nav .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 0.78rem;
}

.cal-dow {
    color: var(--dv-muted);
    padding: 0.3rem 0;
    font-weight: 600;
    font-size: 0.7rem;
}

.cal-cell {
    padding: 0.42rem 0;
    border-radius: 0.5rem;
    color: var(--dv-muted);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cal-cell.has {
    background: rgba(59, 130, 246, 0.12);
    color: var(--dv-accent);
    font-weight: 700;
}

.cal-cell.has:hover {
    background: rgba(59, 130, 246, 0.22);
}

.cal-cell.active {
    background: var(--dv-accent);
    color: #fff;
}

.cal-cell.empty {
    visibility: hidden;
}

.cal-foot {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--dv-border);
}

.project-side-pager {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--dv-border);
}

.project-side-pager-link {
    display: block;
    text-decoration: none;
    border: 1px solid var(--dv-border);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    background: var(--dv-bg-elevated);
    color: var(--dv-ink);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    min-width: 0;
}

a.project-side-pager-link:hover,
a.project-side-pager-link:focus-visible {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.06);
    color: var(--dv-ink);
    transform: translateY(-1px);
    outline: none;
}

.project-side-pager-link .dir {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.72rem;
    color: var(--dv-muted);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.project-side-pager-link.is-next .dir {
    justify-content: flex-end;
}

.project-side-pager-link .title {
    display: block;
    font-weight: 650;
    font-size: 0.84rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-side-pager-link.is-next .title {
    text-align: right;
}

.project-side-pager-link.is-empty {
    visibility: hidden;
    pointer-events: none;
    min-height: 0;
    padding: 0;
    border: 0;
}

[data-theme="dark"] a.project-side-pager-link:hover,
[data-theme="dark"] a.project-side-pager-link:focus-visible {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.1);
}

/* Keep sidebar brief CTA as outline; avoid Bootstrap solid primary flash on click/focus */
.cal-brief-btn.btn-outline-secondary,
.cal-brief-btn.btn-outline-secondary:hover,
.cal-brief-btn.btn-outline-secondary:focus,
.cal-brief-btn.btn-outline-secondary:active,
.cal-brief-btn.btn-outline-secondary:focus-visible {
    color: var(--dv-ink);
    background: transparent;
    border-color: var(--dv-border);
    box-shadow: none;
}

.cal-brief-btn.btn-outline-secondary:hover,
.cal-brief-btn.btn-outline-secondary:focus-visible {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.06);
}

[data-theme="dark"] .cal-brief-btn.btn-outline-secondary,
[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:hover,
[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:focus,
[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:active,
[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:focus-visible {
    color: var(--dv-ink);
    background: transparent;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:hover,
[data-theme="dark"] .cal-brief-btn.btn-outline-secondary:focus-visible {
    color: var(--dv-accent);
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(96, 165, 250, 0.1);
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    scroll-margin-top: 5.5rem;
}

.timeline-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--dv-ink);
    letter-spacing: -0.01em;
}

.timeline-head .count {
    font-size: 0.8rem;
    color: var(--dv-muted);
}

.timeline {
    border-left: 2px solid var(--dv-border);
    margin: 0 0 0 0.55rem;
    padding-left: 1.35rem;
}

.timeline-item {
    margin-bottom: 0.85rem;
    position: relative;
    scroll-margin-top: 5.5rem;
}

.timeline-item::before {
    content: "";
    width: 11px;
    height: 11px;
    background: var(--dv-bg-elevated);
    border: 2px solid var(--dv-accent);
    border-radius: 50%;
    position: absolute;
    left: -1.68rem;
    top: 1.15rem;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.timeline-card-wrap {
    position: relative;
}

.timeline-share-btn {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 3;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dv-border);
    border-radius: 0.45rem;
    background: var(--dv-bg-elevated);
    color: var(--dv-muted);
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.timeline-share-btn i {
    font-size: 1.05rem;
}

.timeline-card-wrap:hover .timeline-share-btn,
.timeline-share-btn:focus-visible,
.timeline-item.is-anchor-target .timeline-share-btn {
    opacity: 1;
}

.timeline-share-btn:hover,
.timeline-share-btn:focus-visible {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}

.timeline-card {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    background: var(--dv-bg-elevated);
    border: 1px solid var(--dv-border);
    border-radius: 14px;
    padding: 1rem 1.15rem 1.05rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.timeline-item.is-anchor-target .timeline-card {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), var(--dv-shadow);
    animation: dvAnchorPulse 1.2s ease-out 1;
}

@keyframes dvAnchorPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.35), var(--dv-shadow); }
    100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18), var(--dv-shadow); }
}

.timeline-card .entry-corner-badge {
    position: absolute;
    top: 0.65rem;
    right: 2.85rem;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 650;
    color: #fff;
    background: #2563eb;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    line-height: 1.2;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.timeline-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dv-shadow);
    border-color: rgba(59, 130, 246, 0.35);
    color: inherit;
}

.timeline-card time {
    display: block;
    font-size: 0.78rem;
    color: var(--dv-muted);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.35rem;
}

.timeline-card h3 {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin: 0.2rem 0 0.4rem;
    color: var(--dv-ink);
    line-height: 1.35;
}

.timeline-card:hover h3 {
    color: var(--dv-accent);
}

.timeline-card .summary {
    color: var(--dv-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--dv-border);
}

.timeline-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--dv-muted);
    font-variant-numeric: tabular-nums;
}

.timeline-stat i {
    font-size: 0.95rem;
    color: var(--dv-accent);
    opacity: 0.85;
}

[data-theme="dark"] .timeline-stats {
    border-top-color: rgba(148, 163, 184, 0.1);
}

.timeline-empty {
    border: 1px dashed var(--dv-border);
    border-radius: 14px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--dv-muted);
    background: rgba(148, 163, 184, 0.04);
}

.timeline-empty i {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* ========== Entry / project brief ========== */
.entry-shell {
    padding: 1.5rem 0 3.75rem;
}

.entry-wrap {
    max-width: 880px;
    margin: 0 auto;
}

.entry-card {
    position: relative;
    background: var(--dv-bg-elevated);
    border: 1px solid var(--dv-border);
    border-radius: 20px;
    box-shadow: var(--dv-shadow);
    padding: 1.65rem 1.75rem 1.9rem;
    overflow: hidden;
}

.entry-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--dv-accent), rgba(100, 116, 139, 0.35));
}

.entry-shell.is-brief .entry-card::before {
    background: linear-gradient(90deg, #38bdf8, var(--dv-accent), rgba(148, 163, 184, 0.4));
}

.entry-hero {
    margin-bottom: 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--dv-border);
}

.entry-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.entry-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dv-accent);
    margin: 0;
}

.entry-project-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dv-muted);
    text-decoration: none;
    border: 1px solid var(--dv-border);
    background: rgba(148, 163, 184, 0.08);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.entry-project-chip:hover {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.entry-hero-chips {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.entry-month-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--dv-muted);
    text-decoration: none;
    border: 1px solid var(--dv-border);
    background: rgba(148, 163, 184, 0.08);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.entry-month-chip:hover {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
}

.entry-month-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--dv-accent);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 400;
}

.entry-month-link:hover {
    text-decoration: underline;
}

.entry-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.1vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
    color: var(--dv-ink);
}

.entry-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    align-items: center;
    color: var(--dv-muted);
    font-size: 0.9rem;
}

.entry-meta-row time {
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.entry-reading-tools {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.article-font-size-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--dv-border);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    flex-shrink: 0;
}

.article-font-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 2rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--dv-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.article-font-size-btn-label {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.article-font-size-btn i {
    font-size: 0.875rem;
    line-height: 1;
}

.article-font-size-btn:hover:not(:disabled),
.article-font-size-btn:focus-visible:not(:disabled) {
    background: rgba(148, 163, 184, 0.16);
    color: var(--dv-ink);
    outline: none;
}

.article-font-size-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.article-font-size-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 1.75rem;
    padding: 0 0.45rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--dv-muted);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.article-font-size-reset:hover,
.article-font-size-reset:focus-visible {
    background: rgba(148, 163, 184, 0.16);
    color: var(--dv-ink);
    outline: none;
}

.article-font-size-reset.is-default {
    color: var(--dv-muted);
}

.entry-lead {
    margin: 0.9rem 0 0;
    color: var(--dv-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 46rem;
}

.entry-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--dv-border);
}

.entry-cta-bar .btn {
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-content,
.entry-prose {
    --article-font-scale: 1;
    color: var(--dv-ink);
    font-size: calc(var(--article-font-scale, 1) * 1.06rem);
    line-height: 1.8;
}

/* Soften a body H1 that differs from the page chrome title (common in project briefs). */
.entry-shell.is-brief .entry-prose > h1:first-child {
    font-size: calc(var(--article-font-scale, 1) * 1.2rem);
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--dv-muted);
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.doc-content > *:first-child {
    margin-top: 0;
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 {
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dv-ink);
}

.doc-content h1 { font-size: calc(var(--article-font-scale, 1) * 1.55rem); }
.doc-content h2 { font-size: calc(var(--article-font-scale, 1) * 1.3rem); }
.doc-content h3 { font-size: calc(var(--article-font-scale, 1) * 1.12rem); }
.doc-content h4 { font-size: calc(var(--article-font-scale, 1) * 1.05rem); }

.doc-content p {
    margin: 0 0 1rem;
}

.doc-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.doc-content ul,
.doc-content ol {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
    font-size: calc(var(--article-font-scale, 1) * 1.01rem);
}

.doc-content li {
    margin: 0.25rem 0;
}

.doc-content pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    overflow: auto;
    font-size: calc(var(--article-font-scale, 1) * 0.88rem);
    margin: 0 0 1.15rem;
}

[data-theme="light"] .doc-content pre {
    background: #111827;
}

.doc-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.doc-content :not(pre) > code {
    background: rgba(100, 116, 139, 0.12);
    border-radius: 0.35rem;
    padding: 0.12rem 0.35rem;
}

.doc-content blockquote {
    margin: 0 0 1.15rem;
    padding: 0.2rem 0 0.2rem 1rem;
    border-left: 3px solid var(--dv-accent);
    color: var(--dv-muted);
}

.doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--dv-border);
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.15rem;
    font-size: calc(var(--article-font-scale, 1) * 0.92rem);
}

.doc-content th,
.doc-content td {
    border: 1px solid var(--dv-border);
    padding: 0.55rem 0.7rem;
}

.doc-content th {
    background: rgba(148, 163, 184, 0.1);
    text-align: left;
}

.entry-view-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--dv-muted);
    font-size: 0.9rem;
}

.react-view-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--dv-border);
    color: var(--dv-muted);
    font-size: 0.9rem;
    background: var(--dv-bg-elevated);
}

.react-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.75rem 0 0;
    padding-top: 1.35rem;
    border-top: 1px solid var(--dv-border);
}

.react-bar .btn {
    border-radius: 999px;
    padding: 0.45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.react-bar .btn.is-active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.45);
    color: var(--dv-accent);
}

.entry-share-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.entry-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.entry-share-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}

.entry-share-bar .doc-share-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
    pointer-events: none;
}

.entry-share-bar .doc-share-icon-btn i {
    font-size: 1.125rem;
    line-height: 1;
}

.entry-share-bar .doc-share-svg-icon {
    width: 1.125rem;
    height: 1.125rem;
    display: block;
    flex-shrink: 0;
}

.entry-share-bar .doc-share-svg-icon--x { width: 1.0625rem; height: 1.0625rem; }
.entry-share-bar .doc-share-svg-icon--wechat { width: 1.25rem; height: 1.25rem; }
.entry-share-bar .doc-share-svg-icon--weibo { width: 1.3125rem; height: 1.3125rem; }
.entry-share-bar .doc-share-svg-icon--qzone { width: 1.25rem; height: 1.25rem; }
.entry-share-bar .doc-share-svg-icon--threads { width: 1.125rem; height: 1.125rem; }
.entry-share-bar .doc-share-svg-icon--hackernews { width: 1rem; height: 1rem; }
.entry-share-bar .doc-share-svg-icon--bluesky { width: 1.1875rem; height: 1.1875rem; }

.entry-share-btn:hover .doc-share-icon-btn,
.entry-share-btn:focus-visible .doc-share-icon-btn {
    transform: translateY(-1px);
    opacity: 0.9;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.entry-share-bar .doc-share-icon-letter {
    font-size: 0.8875rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.entry-share-bar .doc-share-icon--link {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.entry-share-bar .doc-share-icon--qrcode {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.18);
}

.entry-share-bar .doc-share-icon--email {
    background: var(--dv-surface, #fff);
    color: var(--dv-muted, #64748b);
    border: 1.5px solid var(--dv-border, #e2e8f0);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.entry-share-bar .doc-share-icon--qrcode .doc-share-svg-icon {
    width: 1.1875rem;
    height: 1.1875rem;
}

.entry-share-bar .doc-share-icon--native {
    background: var(--dv-surface, #fff);
    color: var(--dv-muted, #64748b);
    border: 1.5px solid var(--dv-border, #e2e8f0);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.entry-share-bar .doc-share-icon--whatsapp { background: #25d366; }
.entry-share-bar .doc-share-icon--telegram { background: #229ed9; }
.entry-share-bar .doc-share-icon--facebook { background: #1877f2; }
.entry-share-bar .doc-share-icon--x { background: #000; color: #fff; }
.entry-share-bar .doc-share-icon--linkedin { background: #0a66c2; }
.entry-share-bar .doc-share-icon--pinterest { background: #e60023; }
.entry-share-bar .doc-share-icon--reddit { background: #ff4500; }
.entry-share-bar .doc-share-icon--threads { background: #000; color: #fff; }
.entry-share-bar .doc-share-icon--bluesky { background: #0085ff; }
.entry-share-bar .doc-share-icon--hackernews { background: #ff6600; color: #fff; border: 1px solid rgba(255, 255, 255, 0.85); }
.entry-share-bar .doc-share-icon--wechat { background: #07c160; }
.entry-share-bar .doc-share-icon--qq { background: #12b7f5; }
.entry-share-bar .doc-share-icon--qzone { background: #face00; color: #12b7f5; }
.entry-share-bar .doc-share-icon--weibo { background: #e6162d; color: #fff; }
.entry-share-bar .doc-share-icon--tieba { background: #2d58ff; }
.entry-share-bar .doc-share-icon--douban { background: #007722; }

[data-theme="dark"] .entry-share-bar .doc-share-icon--link {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.25);
}

[data-theme="dark"] .entry-share-bar .doc-share-icon--qrcode {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.25);
}

[data-theme="dark"] .entry-share-bar .doc-share-icon--email,
[data-theme="dark"] .entry-share-bar .doc-share-icon--native {
    background: rgba(148, 163, 184, 0.08);
    color: var(--dv-muted, #94a3b8);
    border: 1.5px solid var(--dv-border, #334155);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.comment-box {
    margin-top: 1.5rem;
    padding: 1.35rem 1.4rem 1.5rem;
    border: 1px solid var(--dv-border);
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.05);
}

.comment-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
}

/* Comment captcha (SupDoc-style: collapsed until focus) */
.entry-comment-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.entry-comment-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.entry-comment-actions.has-captcha {
    justify-content: space-between;
}

.entry-comment-captcha-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.entry-comment-captcha-wrap.is-collapsed {
    display: none;
}

.entry-comment-captcha-input {
    width: 5.5rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entry-comment-captcha-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--dv-border);
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.08);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.entry-comment-captcha-box:hover {
    border-color: var(--dv-accent);
}

.entry-comment-captcha-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    background: #f1f5f9;
    border-radius: 4px;
}

.entry-comment-captcha-loading {
    font-size: 0.75rem;
    color: var(--dv-muted);
    padding: 0 0.35rem;
}

.entry-comment-error {
    min-height: 1.2em;
}

@media (max-width: 576px) {
    .entry-comment-actions.has-captcha {
        flex-direction: column;
        align-items: stretch;
    }
    .entry-comment-captcha-wrap {
        min-width: 0;
        width: 100%;
    }
    .entry-comment-actions .btn {
        width: 100%;
    }
}

.comment-box h2 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--dv-ink);
}

.comment-item {
    border-bottom: 1px solid var(--dv-border);
    padding: 0.85rem 0;
    color: var(--dv-ink);
}

.comment-item:last-child {
    border-bottom: 0;
}

.comment-item p {
    margin: 0.35rem 0 0;
    line-height: 1.55;
    color: var(--dv-ink);
}

.comment-item strong {
    font-weight: 650;
}

.entry-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .entry-pager {
        grid-template-columns: 1fr;
    }
}

.entry-pager a {
    display: block;
    text-decoration: none;
    border: 1px solid var(--dv-border);
    border-radius: 14px;
    padding: 0.95rem 1.1rem;
    background: var(--dv-bg-elevated);
    color: var(--dv-ink);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    min-height: 4.5rem;
}

.entry-pager a:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--dv-shadow);
    transform: translateY(-1px);
    color: var(--dv-ink);
}

.entry-pager .dir {
    display: block;
    font-size: 0.75rem;
    color: var(--dv-muted);
    margin-bottom: 0.25rem;
}

.entry-pager .title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.entry-pager .is-next {
    text-align: right;
}

.entry-pager .is-empty {
    visibility: hidden;
}

/* Home polish */
.portal-hero {
    padding: 3.25rem 0 1.75rem;
    text-align: center;
    position: relative;
}

.portal-hero h1 {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 740;
    letter-spacing: -0.035em;
    margin: 0 0 0.55rem;
    color: var(--dv-ink);
}

.portal-hero p {
    color: var(--dv-muted);
    max-width: 36rem;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.55;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.65rem;
    padding: 1.1rem 0 3.75rem;
}

@media (max-width: 768px) {
    .dv-page {
        min-height: calc(100dvh - 7rem);
    }

    .dv-page > .container {
        padding-left: max(0.85rem, env(safe-area-inset-left, 0));
        padding-right: max(0.85rem, env(safe-area-inset-right, 0));
    }

    .portal-hero {
        padding: 2rem 0 1.25rem;
    }

    .portal-hero h1 {
        font-size: clamp(1.55rem, 7vw, 2rem);
    }

    .portal-hero p {
        font-size: 0.95rem;
        padding: 0 0.25rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0.75rem 0 1.25rem;
    }

    .project-cover {
        height: 170px;
    }

    .project-body {
        padding: 1.2rem 1.15rem 1.25rem;
    }

    .project-meta {
        gap: 0.4rem 0.75rem;
    }

    .project-actions .btn {
        min-width: 0;
    }

    .project-layout {
        gap: 1.25rem;
        padding: 1.1rem 0 1.5rem;
    }

    .calendar-box {
        position: static;
    }

    .timeline {
        margin-left: 0.35rem;
        padding-left: 1.1rem;
    }

    .timeline-card {
        padding: 0.9rem 1rem;
    }

    .entry-card {
        padding: 1.15rem 1.05rem 1.35rem;
        border-radius: 14px;
    }

    .entry-hero h1 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        word-break: break-word;
    }

    .entry-reading-tools {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .doc-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: calc(var(--article-font-scale, 1) * 0.95rem);
    }

    .doc-content pre,
    .doc-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .doc-content img {
        max-width: 100%;
        height: auto;
    }

    .react-bar .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .comment-box {
        padding: 1.1rem 1rem 1.25rem;
    }
}

.project-card {
    border: 1px solid var(--dv-border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--dv-bg-elevated);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--dv-shadow);
    border-color: rgba(59, 130, 246, 0.28);
}

.project-cover-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-cover-link:hover .project-cover,
.project-cover-link:focus-visible .project-cover {
    filter: brightness(1.04);
}

.project-cover-link:focus-visible {
    outline: none;
}

.project-cover-link:focus-visible .project-cover {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.55);
}

.project-cover {
    position: relative;
    /* Match common cover export 300x190 (~1.58:1) */
    height: 190px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dv-cover-fg, #fff);
    overflow: hidden;
    transition: filter 0.15s ease;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
    background: #e2e8f0;
    border: 0;
}

.project-cover.text-cover {
    background: var(--dv-cover-bg, linear-gradient(145deg, #64748b 0%, #1f2937 100%));
    padding: 1.25rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 720;
    letter-spacing: -0.02em;
    line-height: 1.3;
    z-index: 0;
}

[data-theme="dark"] .project-cover:not(.text-cover),
[data-theme="dark"] .project-cover:not(.text-cover) img {
    background: #1e293b;
}

.project-cover .cover-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 650;
    background: rgba(37, 99, 235, 0.95);
    color: #fff;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.project-cover .cover-badge.badge-pos-tl { top: 0.75rem; left: 0.75rem; right: auto; bottom: auto; }
.project-cover .cover-badge.badge-pos-tr { top: 0.75rem; right: 0.75rem; left: auto; bottom: auto; }
.project-cover .cover-badge.badge-pos-bl { bottom: 0.75rem; left: 0.75rem; top: auto; right: auto; }
.project-cover .cover-badge.badge-pos-br { bottom: 0.75rem; right: 0.75rem; top: auto; left: auto; }

.project-announcement {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.04));
    color: var(--dv-ink);
}

.project-announcement > i {
    color: var(--dv-accent);
    font-size: 1.25rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.project-announcement-body {
    font-size: 0.925rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.project-body {
    padding: 1.55rem 1.5rem 1.55rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-body h2 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1.18rem;
    font-weight: 680;
    letter-spacing: -0.02em;
    margin: 0 0 0.45rem;
    line-height: 1.35;
    color: var(--dv-ink);
}

.project-code {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.55rem;
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--dv-muted);
}

.project-code-label {
    flex-shrink: 0;
    opacity: 0.9;
}

.project-code code {
    display: inline-block;
    max-width: 100%;
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.1);
    color: var(--dv-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    word-break: break-all;
}

[data-theme="dark"] .project-code code {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
}

.project-body .summary {
    color: var(--dv-muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
    flex: 1;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    word-break: break-word;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.55rem;
    margin: auto 0 1.25rem;
    padding-top: 1.05rem;
    border-top: 1px solid var(--dv-border);
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--dv-muted);
}

.project-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.project-meta-item > span {
    white-space: nowrap;
}

.project-meta-item > i {
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.9;
}

.project-rank {
    color: var(--dv-ink);
    font-weight: 650;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.18);
}

.project-rank i {
    color: var(--dv-accent);
    opacity: 1;
}

[data-theme="dark"] .project-meta-item {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .project-rank {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
}

.project-rank-place {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--dv-accent);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    line-height: 1.2;
}

.project-chip-rank {
    color: var(--dv-accent);
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.08);
    font-weight: 650;
}

[data-theme="dark"] .project-rank-place {
    background: rgba(96, 165, 250, 0.14);
    border-color: rgba(96, 165, 250, 0.28);
}

[data-theme="dark"] .project-chip-rank {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.28);
}

.project-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.project-actions .btn {
    flex: 1;
    min-width: 110px;
    border-radius: 0.55rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--dv-muted);
    padding: 2.5rem;
}

/* Dark mode: soften dividers / card strokes on entry & list pages */
[data-theme="dark"] .entry-card {
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    background: rgba(30, 41, 59, 0.72);
}

[data-theme="dark"] .entry-hero,
[data-theme="dark"] .react-bar,
[data-theme="dark"] .entry-cta-bar {
    border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .comment-box {
    border-color: rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.35);
}

[data-theme="dark"] .comment-item {
    border-color: rgba(148, 163, 184, 0.08);
}

[data-theme="dark"] .entry-pager a,
[data-theme="dark"] .entry-project-chip,
[data-theme="dark"] .entry-month-chip,
[data-theme="dark"] .timeline-card,
[data-theme="dark"] .calendar-box,
[data-theme="dark"] .project-card {
    border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .timeline {
    border-left-color: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] .doc-content hr {
    border: 0;
    height: 1px;
    background: rgba(148, 163, 184, 0.14);
    opacity: 1;
    margin: 1.75rem 0;
}

[data-theme="dark"] .doc-content img,
[data-theme="dark"] .doc-content th,
[data-theme="dark"] .doc-content td {
    border-color: rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .site-footer {
    border-color: rgba(148, 163, 184, 0.1) !important;
}
