/* Homepage, tag and author lists */

.list {
    width: 100%;
    max-width: calc(var(--column) + 40px);
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Hero */
.hero { text-align: center; padding: 64px 0 52px; }
.hero-small { padding: 40px 0 32px; }
.hero-title {
    font-size: clamp(32px, 7vw, 46px);
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.hero-title em { display: block; font-style: italic; font-weight: 400; }
.hero-subtitle { margin: 14px auto 0; max-width: 46ch; color: var(--text-soft); font-size: 15px; }
.hero-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.hero-count { margin: 10px 0 0; font-size: 13px; color: var(--text-soft); }
.author-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover; }

/* Topic pills (smaller text needs a smaller optical nudge than buttons) */
.pill, .tag, .badge { --optical-shift: 0.022em; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: calc(6px + var(--optical-shift)) 13px calc(6px - var(--optical-shift));
    line-height: 1.4;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pill:hover { border-color: var(--hl); }
.pill.is-active {
    padding-left: 24px;
    background: var(--ink);
    border-color: var(--ink);
}
.pill.is-active::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--hl);
    box-shadow: 0 0 8px var(--hl);
}

/* Post cards */
.post-feed { display: flex; flex-direction: column; gap: 14px; }

.post-card {
    border-radius: var(--radius-card);
    padding: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover { border-color: rgba(255, 255, 255, 0.42); }
.post-card:hover .post-card-read { border-color: var(--hl); box-shadow: 0 0 14px -4px var(--hl); }

.post-card-top { display: flex; gap: 12px; align-items: flex-start; }
.post-card-thumb { flex: none; }
.post-card-thumb img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.post-card-head { flex: 1; min-width: 0; }
.post-card-title { font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.post-card-title a { text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card-read, .post-card-tags a { position: relative; z-index: 1; }
.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-soft);
}
.badge {
    padding: calc(2px + var(--optical-shift)) 8px calc(2px - var(--optical-shift));
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.18);
    color: var(--text);
    font-weight: 500;
}
.post-card-read { flex: none; --py: 6px; padding-left: 12px; padding-right: 12px; font-size: 12px; }

.post-card-excerpt { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, 0.92); }

.post-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.tag {
    display: inline-block;
    max-width: 100%;
    padding: calc(3px + var(--optical-shift)) 10px calc(3px - var(--optical-shift));
    line-height: 1.4;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag:hover { border-color: var(--hl); }

/* Pagination */
.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    font-size: 13px;
}
.pagination .btn[rel="next"] { justify-self: end; }
.pagination-count { color: var(--text-soft); }

/* Newsletter */
.newsletter {
    margin-top: 32px;
    padding: 26px 22px;
    border-radius: var(--radius-card);
    text-align: center;
}
.newsletter-title { font-size: 28px; }
.newsletter-text { margin: 6px 0 0; font-size: 14px; color: var(--text-soft); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.newsletter-form input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    color: var(--text);
    font: 15px var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.7); }
.newsletter-form .btn { --py: 10px; padding-left: 18px; padding-right: 18px; }
.newsletter-loading, .newsletter-message { display: none; }
.newsletter-message { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }
.newsletter-form.loading .newsletter-default { display: none; }
.newsletter-form.loading .newsletter-loading { display: inline; }
.newsletter-form.success .newsletter-success,
.newsletter-form.error .newsletter-error { display: block; }
.newsletter-form.success input,
.newsletter-form.success .btn { display: none; }

@media (max-width: 520px) {
    .post-card-read { display: none; }
    .post-card { padding: 16px; }
}
