.digest-page {
    min-height: 100vh;
}

.digest-page .digest-nav {
    position: sticky;
}

.digest-nav-links .is-active {
    color: var(--brand-gold);
    text-shadow: 0 0 10px rgba(248, 212, 76, 0.5);
}

.digest-shell {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding: 110px 0 70px;
}

.digest-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: clamp(24px, 4vw, 56px);
    align-items: stretch;
    min-height: 380px;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid var(--border-strong);
    background:
        linear-gradient(90deg, rgba(5, 5, 5, 0.94), rgba(5, 5, 5, 0.74) 54%, rgba(5, 5, 5, 0.42)),
        linear-gradient(135deg, rgba(248, 212, 76, 0.18), transparent 42%),
        url('/assets/images/clear_header.png') center / cover no-repeat;
    box-shadow: var(--shadow-0);
}

.digest-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 2px,
            rgba(248, 212, 76, 0.035) 3px,
            transparent 4px
        );
    pointer-events: none;
}

.digest-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold), transparent);
    box-shadow: 0 0 20px rgba(248, 212, 76, 0.35);
}

.digest-hero-copy,
.digest-meta-panel {
    position: relative;
    z-index: 1;
}

.digest-kicker,
.digest-label,
.digest-status,
.digest-card-source,
.digest-card-section,
.digest-card-tags,
.digest-card-number,
.digest-card-action,
.digest-card-share,
.digest-toolbar-label,
.digest-meta-panel {
    font-family: var(--text-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.digest-kicker,
.digest-label {
    color: var(--brand-gold);
    font-size: 0.78rem;
    margin-bottom: 10px;
}

.digest-hero h1 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(3.5rem, 8vw, 8.5rem);
    line-height: 0.84;
    text-transform: uppercase;
    color: var(--text-0);
    max-width: 9ch;
    text-shadow:
        0 0 22px rgba(248, 212, 76, 0.18),
        3px 3px 0 rgba(248, 212, 76, 0.08);
}

.digest-subtitle {
    max-width: 720px;
    margin-top: 22px;
    color: var(--text-1);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.55;
}

.digest-meta-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    color: var(--text-1);
    font-size: 0.85rem;
    text-align: right;
}

.digest-meta-panel span {
    display: grid;
    gap: 5px;
    padding: 14px 16px;
    border: 1px solid rgba(248, 212, 76, 0.25);
    background: rgba(0, 0, 0, 0.54);
    box-shadow: inset 0 0 18px rgba(248, 212, 76, 0.04);
}

.digest-meta-panel strong {
    color: var(--brand-gold);
    font-size: 0.68rem;
}

.digest-meta-panel em {
    color: var(--text-0);
    font-style: normal;
    text-transform: none;
    letter-spacing: 0;
}

.digest-briefing-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid rgba(248, 212, 76, 0.22);
    border-top: 0;
    background: rgba(10, 10, 10, 0.8);
}

.digest-briefing-strip div {
    padding: 18px 22px;
    border-right: 1px solid rgba(248, 212, 76, 0.14);
}

.digest-briefing-strip div:last-child {
    border-right: 0;
}

.digest-strip-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(224, 224, 224, 0.58);
    font-family: var(--text-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.digest-briefing-strip strong {
    color: var(--brand-gold);
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    text-transform: uppercase;
}

.digest-tldr {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
    padding: 24px 30px;
    border: 1px solid rgba(248, 212, 76, 0.28);
    background: rgba(248, 212, 76, 0.06);
}

.digest-tldr h2 {
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    font-size: 1.45rem;
}

#digest-tldr-text {
    color: var(--text-0);
    font-size: clamp(1.15rem, 2vw, 1.75rem);
    line-height: 1.45;
}

.digest-calendar {
    margin-top: 44px;
    padding: 22px 24px;
    border: 1px solid rgba(248, 212, 76, 0.28);
    background:
        linear-gradient(135deg, rgba(248, 212, 76, 0.08), transparent 42%),
        rgba(10, 10, 10, 0.72);
}

.digest-calendar-bottom {
    margin-top: 56px;
}

.digest-calendar-intro {
    max-width: 760px;
    margin-bottom: 20px;
}

.digest-calendar-intro h2 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.05;
    text-transform: uppercase;
}

.digest-calendar-intro p:last-child {
    margin-top: 10px;
    color: rgba(224, 224, 224, 0.72);
    line-height: 1.6;
}

.digest-calendar-main {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 14px;
    align-items: end;
}

.digest-date-arrow {
    min-height: 45px;
    border: 1px solid rgba(248, 212, 76, 0.34);
    background: rgba(0, 0, 0, 0.28);
    color: var(--brand-gold);
    font-family: var(--text-mono);
    font-size: 1.3rem;
    cursor: pointer;
}

.digest-date-arrow:hover,
.digest-date-arrow.has-issue {
    background: rgba(248, 212, 76, 0.12);
    border-color: var(--brand-gold);
}

.digest-date-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.digest-date-form label,
.digest-recent-head,
.digest-date-badge {
    font-family: var(--text-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.digest-date-form label {
    display: block;
    margin-bottom: 8px;
    color: rgba(224, 224, 224, 0.72);
    font-size: 0.75rem;
}

.digest-date-input-row {
    display: flex;
    gap: 10px;
}

.digest-date-input-row input,
.digest-date-input-row button {
    min-height: 45px;
    border: 1px solid rgba(248, 212, 76, 0.34);
    background: rgba(0, 0, 0, 0.36);
    color: var(--text-0);
    padding: 0 14px;
    font: inherit;
}

.digest-date-input-row input {
    width: 100%;
    color-scheme: dark;
}

.digest-date-input-row button {
    color: #080808;
    background: var(--brand-gold);
    font-family: var(--text-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.digest-date-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.digest-date-badge {
    padding: 7px 9px;
    border: 1px solid rgba(248, 212, 76, 0.26);
    color: rgba(224, 224, 224, 0.78);
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.7rem;
}

.digest-date-badge.is-today {
    color: var(--brand-gold);
    border-color: rgba(248, 212, 76, 0.5);
}

.digest-date-badge.is-empty {
    color: #ffb86b;
    border-color: rgba(255, 184, 107, 0.35);
}

.digest-recent-picker {
    margin-top: 16px;
}

.digest-recent-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(224, 224, 224, 0.68);
    font-size: 0.72rem;
    margin-bottom: 9px;
}

.digest-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gold);
}

.digest-date-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.digest-date-chip {
    border: 1px solid rgba(224, 224, 224, 0.18);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(224, 224, 224, 0.72);
    padding: 8px 10px;
    font-family: var(--text-mono);
    font-size: 0.72rem;
    cursor: pointer;
}

.digest-date-chip.has-issue {
    border-color: rgba(248, 212, 76, 0.45);
    color: var(--text-0);
    background: rgba(248, 212, 76, 0.08);
}

.digest-date-chip.is-active {
    background: var(--brand-gold);
    color: #080808;
    border-color: var(--brand-gold);
}

.digest-date-chip.is-empty {
    opacity: 0.72;
}

.digest-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 24px 0 22px;
}

.digest-toolbar-label {
    color: rgba(224, 224, 224, 0.62);
    font-size: 0.72rem;
    margin-right: 4px;
}

.digest-button {
    border: 1px solid var(--border-strong);
    background: rgba(248, 212, 76, 0.08);
    color: var(--brand-gold);
    padding: 11px 16px;
    font-family: var(--text-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.digest-button:hover,
.digest-button.is-active {
    background: var(--brand-gold);
    color: #080808;
}

.digest-button-link {
    text-decoration: none;
}

.digest-archive-link {
    display: inline-flex;
    margin-top: 18px;
}

.digest-status {
    margin-left: auto;
    color: rgba(224, 224, 224, 0.72);
    font-size: 0.78rem;
}

.digest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.digest-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto auto 1fr auto auto;
    gap: 17px;
    min-height: 520px;
    padding: 0 0 24px;
    border: 1px solid var(--border-0);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
        rgba(10, 10, 10, 0.86);
    box-shadow: var(--shadow-0);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.digest-card:hover {
    transform: translateY(-3px);
    border-color: rgba(248, 212, 76, 0.46);
    box-shadow: var(--shadow-0), 0 0 22px rgba(248, 212, 76, 0.08);
}

.digest-card.is-discussed {
    opacity: 0.48;
}

.digest-card.is-discussed::after {
    content: "READ";
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 7px 9px;
    border: 1px solid rgba(0, 255, 128, 0.45);
    color: #88ffbd;
    background: rgba(0, 255, 128, 0.08);
    font-family: var(--text-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.digest-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px;
}

.digest-card-number {
    color: var(--brand-gold);
    font-size: 0.85rem;
}

.digest-card-section {
    color: #080808;
    background: var(--brand-gold);
    padding: 5px 8px;
    font-size: 0.65rem;
    font-weight: 700;
}

.digest-card-source {
    margin-left: auto;
    color: rgba(224, 224, 224, 0.72);
    font-size: 0.72rem;
    text-align: right;
}

.digest-card-image {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid rgba(248, 212, 76, 0.24);
    background: rgba(0, 0, 0, 0.35);
}

.digest-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.digest-card-image-placeholder {
    display: grid;
    place-items: center;
    min-height: 180px;
    background:
        radial-gradient(circle at center, rgba(248, 212, 76, 0.12), transparent 62%),
        rgba(0, 0, 0, 0.34);
}

.digest-card-image-placeholder img {
    width: min(46%, 220px);
    aspect-ratio: auto;
    object-fit: contain;
    opacity: 0.7;
    filter: drop-shadow(0 0 18px rgba(248, 212, 76, 0.25));
}

.digest-card-image figcaption {
    position: absolute;
    right: 9px;
    bottom: 8px;
    font-family: var(--text-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.digest-card-image figcaption a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 5px 7px;
}

.digest-card-image figcaption a:hover {
    color: var(--brand-gold);
    border-color: rgba(248, 212, 76, 0.45);
}

.digest-card h2 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.75rem, 3vw, 3rem);
    line-height: 1.02;
    color: var(--text-0);
    padding: 0 24px;
}

.digest-card-summary {
    display: block;
    margin: 0 24px;
    padding: 16px 18px;
    border-left: 3px solid var(--brand-gold);
    background: rgba(248, 212, 76, 0.07);
    color: var(--text-0);
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.5;
}

.digest-card-summary span {
    display: block;
    margin-bottom: 7px;
    color: var(--brand-gold);
    font-family: var(--text-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.digest-card-analysis {
    padding: 0 24px;
    color: rgba(224, 224, 224, 0.78);
    font-size: 1rem;
    line-height: 1.6;
}

.digest-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px;
    color: var(--brand-gold);
    font-size: 0.72rem;
}

.digest-card-tags span {
    padding: 6px 8px;
    border: 1px solid rgba(248, 212, 76, 0.25);
    background: rgba(248, 212, 76, 0.06);
}

.digest-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-self: end;
    padding: 0 24px;
}

.digest-card-action,
.digest-card-share a,
.digest-card-share button {
    border: 1px solid rgba(248, 212, 76, 0.34);
    background: transparent;
    color: var(--text-1);
    padding: 9px 11px;
    text-decoration: none;
    font-size: 0.72rem;
    cursor: pointer;
    font-family: var(--text-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.digest-card-action:hover,
.digest-card-share a:hover,
.digest-card-share button:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

.digest-card-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px;
    color: rgba(224, 224, 224, 0.62);
    font-size: 0.68rem;
}

.digest-card-share span {
    color: var(--brand-gold);
    margin-right: 2px;
}

.digest-card-share button {
    appearance: none;
}

.digest-empty {
    padding: 40px;
    border: 1px solid var(--border-0);
    background: rgba(10, 10, 10, 0.78);
    text-align: center;
}

.digest-empty h2 {
    font-family: 'Manrope', sans-serif;
    margin-bottom: 12px;
}

@media (max-width: 980px) {
    .digest-hero,
    .digest-tldr {
        grid-template-columns: 1fr;
    }

    .digest-hero {
        min-height: 0;
    }

    .digest-meta-panel {
        min-width: 0;
        text-align: left;
    }

    .digest-briefing-strip {
        grid-template-columns: 1fr;
    }

    .digest-briefing-strip div {
        border-right: 0;
        border-bottom: 1px solid rgba(248, 212, 76, 0.14);
    }

    .digest-briefing-strip div:last-child {
        border-bottom: 0;
    }

    .digest-grid {
        grid-template-columns: 1fr;
    }

    .digest-status {
        width: 100%;
        margin-left: 0;
    }

    .digest-calendar-main {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }
}

@media (max-width: 640px) {
    .digest-shell {
        width: min(100% - 24px, 1500px);
        padding-top: 96px;
    }

    .digest-hero,
    .digest-tldr,
    .digest-calendar,
    .digest-card {
        padding: 20px;
    }

    .digest-card {
        padding: 0 0 20px;
    }

    .digest-card-head,
    .digest-card h2,
    .digest-card-analysis,
    .digest-card-tags,
    .digest-card-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .digest-card-share {
        padding-left: 18px;
        padding-right: 18px;
    }

    .digest-card-summary {
        margin-left: 18px;
        margin-right: 18px;
    }

    .digest-date-input-row {
        flex-direction: column;
    }

    .digest-nav-links {
        display: flex;
        gap: 10px;
    }

    .digest-nav-links li {
        margin-left: 0;
    }
}
