.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.news-header .section-title {
    margin-bottom: 0;
}

.news-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.news-intro {
    margin-top: 12px;
    font-size: 1rem;
    line-height: 1.8;
    color: #d0d0d0;
}

.news-button,
.news-button-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.news-button {
    border: none;
    background: linear-gradient(90deg, #c41e3a, #d4a017);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.news-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.news-button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
}

.news-button-danger {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #ff8a8a;
    margin-left: auto;
}

.news-message {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.news-message-error {
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #ffb3c0;
}

.news-message-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.5);
    color: #b5e8bd;
}

.news-wizard {
    margin-top: 20px;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(212, 160, 23, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.news-wizard-title {
    font-size: 1rem;
    color: #d4a017;
    margin-bottom: 12px;
}

.news-wizard label,
.news-edit-form label {
    display: block;
    font-size: 0.85rem;
    color: #e0d6c8;
    margin-bottom: 6px;
}

.news-spaced-label {
    margin-top: 12px;
}

.news-textarea,
.news-input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.news-input[type="date"] {
    color-scheme: dark;
}

.news-textarea:focus,
.news-input:focus {
    outline: none;
    border-color: #c41e3a;
}

.news-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.news-form-row > div {
    min-width: 160px;
}

.news-form-row > .news-form-grow {
    flex: 1;
}

.news-hint {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin: 8px 0 0;
}

.news-hint code {
    color: #d4a017;
}

.news-filename-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-filename-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-filename-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.news-add-file-button {
    align-self: flex-start;
    margin-top: 8px;
}

.news-wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.news-empty {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 40px 0;
}

.news-edit-button {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #e0d6c8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    float: right;
}

.news-edit-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-edit-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* The posts: the History page's timeline, newest at the top. */
.news-list {
    position: relative;
    margin-top: 25px;
    padding-left: 40px;
}

.news-list::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #c41e3a, rgba(196, 30, 58, 0.2));
}

.news-item {
    position: relative;
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-marker {
    position: absolute;
    left: -32px;
    top: 28px;
    width: 16px;
    height: 16px;
    background: #c41e3a;
    border-radius: 50%;
    border: 3px solid #18181b;
    box-shadow: 0 0 0 3px #c41e3a;
    z-index: 1;
}

.news-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s ease;
}

.news-content:hover {
    border-color: rgba(196, 30, 58, 0.3);
}

.news-item-focus .news-content {
    border-color: #d4a017;
    box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.35);
}

.news-date {
    display: inline-block;
    background: linear-gradient(135deg, #c41e3a, #d4a017);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.news-author {
    margin: -4px 0 10px;
    font-size: 0.85rem;
    font-style: italic;
    color: #d4a017;
    overflow-wrap: anywhere;
}

.news-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #b0b0b0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.news-text + .news-text {
    margin-top: 12px;
}

.news-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.news-photo {
    display: block;
    padding: 0;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
}

.news-photo[hidden] {
    display: none;
}

.news-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.news-photo:hover img,
.news-photo:focus-visible img {
    opacity: 1;
}

.news-photo:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
}

/* One photo is shown whole, like a History entry's. */
.news-photos-single {
    grid-template-columns: 1fr;
}

.news-photos-single .news-photo {
    aspect-ratio: auto;
}

.news-photos-single .news-photo img {
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

.news-documents {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-document {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212, 160, 23, 0.4);
    background: rgba(212, 160, 23, 0.08);
    color: #ffffff;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
}

.news-document:hover,
.news-document:focus-visible {
    border-color: #d4a017;
    background: rgba(212, 160, 23, 0.16);
}

.news-document-icon {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 4px;
    background: #c41e3a;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.news-document-name {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .news-list {
        padding-left: 30px;
    }

    .news-list::before {
        left: 10px;
    }

    .news-marker {
        left: -26px;
        top: 20px;
        width: 14px;
        height: 14px;
    }

    .news-content {
        padding: 16px;
    }

    .news-photos {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-photos-single {
        grid-template-columns: 1fr;
    }
}
