/* The /weekly digest pages: national index, state index, and the per-area
   edition page that is the digest's shareable artifact. Same design language
   as the message page (css/message-page.css): light shell, white cards,
   dark 800-weight headings. Every page here sets `public_header`, so the
   shell reserves the fixed header's height like message-main does. */

.digest-main {
    background: #f8fafc;
    min-height: 100vh;
    padding: calc(var(--public-header-desktop-height, 97px) + 28px) clamp(16px, 4vw, 40px) 72px;
}

.digest-shell {
    margin: 0 auto;
    max-width: 760px;
    width: 100%;
}

.digest-breadcrumbs {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 18px;
}

.digest-breadcrumbs a {
    color: #4b5563;
    text-decoration: none;
}

.digest-breadcrumbs a:hover {
    text-decoration: underline;
}

.digest-breadcrumb-sep {
    margin: 0 6px;
}

.digest-header {
    margin: 0 0 20px;
}

.digest-eyebrow {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.digest-header h1 {
    color: #1a1a1a;
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 8px;
}

.digest-week {
    color: #4b5563;
    font-size: 1.02rem;
    font-weight: 600;
    margin: 0;
}

.digest-week-note {
    color: #6b7280;
    font-weight: 400;
}

.digest-lead {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin: 12px 0 0;
    max-width: 60ch;
}

.digest-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
    margin: 0 0 18px;
    padding: clamp(20px, 4vw, 30px);
}

.digest-card h2 {
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
}

.digest-subheading {
    color: #1a1a1a;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 18px 0 10px;
}

.digest-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.digest-items li {
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 10px 0;
}

.digest-items li:first-child {
    border-top: 0;
}

.digest-item-address {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

a.digest-item-address:hover {
    text-decoration: underline;
}

.digest-item-fact {
    color: #4b5563;
}

.digest-more {
    color: #6b7280;
    font-size: 0.92rem;
    margin: 10px 0 0;
}

.digest-empty {
    color: #4b5563;
    margin: 0;
}

/* Share panel */

.digest-share-lead,
.digest-subscribe-lead {
    color: #4b5563;
    line-height: 1.55;
    margin: 0 0 14px;
}

.digest-share-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.digest-share-blurb {
    color: #111827;
    line-height: 1.55;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}

.digest-copy-button {
    background: #111111;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 18px;
}

.digest-copy-button:hover {
    background: #2d2d2d;
}

/* Subscribe panel */

.digest-subscribe-hp {
    left: -9999px;
    position: absolute;
    top: auto;
}

.digest-subscribe-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.digest-subscribe-label {
    position: absolute;
    clip: rect(0 0 0 0);
    height: 1px;
    overflow: hidden;
    width: 1px;
}

.digest-subscribe-row input[type="email"] {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    flex: 1 1 220px;
    font-size: 1rem;
    min-width: 0;
    padding: 10px 14px;
}

.digest-subscribe-button {
    background: #111111;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 18px;
}

.digest-subscribe-button:hover {
    background: #2d2d2d;
}

.digest-subscribe-button[disabled] {
    background: #6b7280;
    cursor: default;
}

/* The form must truly disappear on success (the E-237 lesson: a grid rule
   outranking the hidden attribute left a live button above the success
   line). */
.digest-subscribe-form[hidden] {
    display: none;
}

.digest-subscribe-status {
    border-radius: 8px;
    font-weight: 600;
    margin: 12px 0 0;
    padding: 10px 14px;
}

.digest-subscribe-status[data-tone="success"] {
    background: #ecfdf5;
    color: #065f46;
}

.digest-subscribe-status[data-tone="error"] {
    background: #fef2f2;
    color: #991b1b;
}

/* Footer */

.digest-foot {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 6px 0 0;
}

.digest-history {
    margin: 0 0 8px;
}

.digest-foot a {
    color: #4b5563;
}

.digest-area-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.digest-area-list li {
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: space-between;
    padding: 10px 0;
}

.digest-area-list li:first-child {
    border-top: 0;
}

.digest-area-name {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}

a.digest-area-name:hover {
    text-decoration: underline;
}

.digest-area-counts {
    color: #6b7280;
}

@media (max-width: 640px) {
    .digest-main {
        padding-top: calc(var(--public-header-mobile-height, 59px) + 20px);
    }

    .digest-subscribe-button {
        flex: 1 1 100%;
    }
}
