.header-resources { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.news-entry.has-unread { color: var(--accent); border-color: var(--accent); background: var(--accent-subtle); animation: news-unread-glow 2.4s ease-in-out 2; }
@keyframes news-unread-glow {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 12px 3px var(--accent-subtle); }
}
.news-dialog [hidden], .news-required-dialog [hidden], #view-news-admin [hidden] { display: none !important; }
.news-scroll { min-height: 0; overflow: auto; flex: 1; overscroll-behavior: contain; }
.news-content { width: min(100%, 860px); margin: 0 auto; padding: 44px 32px 64px; }
.news-intro h1 { margin: 10px 0 12px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -1px; line-height: 1.25; }
.news-intro > p { color: var(--text-secondary); font-size: 16px; }
.news-count { color: var(--accent); min-height: 24px; font-size: 13px; margin: 20px 0 16px; }
.news-article { padding: 28px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-primary); margin: 0 0 20px; overflow-wrap: anywhere; }
.news-article.is-unread { border-left: 3px solid var(--accent); }
.news-article-header { margin-bottom: 18px; }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.news-new { color: var(--accent); background: var(--accent-subtle); border-radius: 20px; padding: 2px 9px; font-weight: 600; }
.news-article h2 { font-size: 23px; line-height: 1.35; font-weight: 600; letter-spacing: -.4px; }
.news-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.8; color: var(--text-secondary); }
.news-body a { text-decoration: underline; text-underline-offset: 3px; }
.news-article-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.news-status, #news-admin-status, #news-admin-list-status { color: var(--text-secondary); font-size: 14px; white-space: pre-wrap; }
.news-status:not(:empty), #news-admin-status:not(:empty), #news-admin-list-status:not(:empty) { margin: 12px 0; }
.news-empty { padding: 32px; border: 1px solid var(--border); border-radius: 14px; color: var(--text-secondary); font-size: 16px; }
.news-empty strong { display: block; margin-bottom: 6px; color: var(--text-primary); }
#news-retry, #news-more, #news-refresh { margin-bottom: 20px; }
.news-published-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.news-published-heading .news-list-heading { margin-bottom: 0; }
.news-admin-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.news-admin-heading p { color: var(--text-secondary); margin-top: 6px; }
.news-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.news-editor { border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.news-editor h3, .news-list-heading { margin-bottom: 18px; font-size: 17px; }
.news-editor .form-group { margin-bottom: 18px; gap: 8px; }
.news-editor .form-group label { text-transform: none; letter-spacing: normal; font-size: 14px; }
.news-editor .form-help { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.news-editor textarea { width: 100%; min-height: 160px; resize: vertical; line-height: 1.6; }
.news-editor-footer { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }
.news-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.news-editor-actions .btn, .news-admin-heading .btn, .news-published .btn { min-height: 44px; white-space: normal; }
.news-preview { min-width: 0; padding: 20px; border-radius: 10px; background: var(--bg-secondary); }
.news-preview h3 { color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.news-preview .news-article { padding: 0; margin: 0; border: 0; background: transparent; }
.news-preview .news-article h2 { font-size: 22px; }
.news-preview .news-body { font-size: 15px; }
#news-admin-preview { max-height: min(480px, 60dvh); overflow: auto; overflow-wrap: anywhere; padding: 4px; margin: -4px; }
.news-published { margin-top: 20px; }
.news-published .news-article { padding: 24px; }
.news-published .news-article h2 { font-size: 20px; }
.news-published .news-body { font-size: 15px; }
.news-required-option { border-top: 1px solid var(--border); padding-top: 8px; }
.news-required-option label { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.news-required-option .toggle { flex-shrink: 0; }
.news-required-option .toggle input { inset: 0; width: 100%; height: 100%; margin: 0; pointer-events: auto; z-index: 1; }
.news-required-option p { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
#news-ack-history { margin-top: 10px; }
.news-required-badge { color: var(--accent); font-weight: 600; }
.news-required-dialog { width: min(680px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-primary); color: var(--text-primary); box-shadow: 0 24px 80px rgb(0 0 0 / 20%); }
.news-required-dialog[open] { display: flex; flex-direction: column; }
.news-required-dialog::backdrop { background: rgb(0 0 0 / 40%); }
.news-required-header { padding: 26px 32px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.news-required-header h2 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.news-required-header p { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.news-required-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 28px 32px; outline: none; }
.news-required-scroll .news-article-header { border-inline-start: 2px solid transparent; padding-inline-start: 12px; margin-inline-start: -14px; }
.news-required-scroll:focus-visible .news-article-header { border-inline-start-color: var(--text-muted); }
.news-required-scroll .news-article { border: 0; padding: 0; margin: 0; }
.news-required-scroll .news-required-badge, .news-required-scroll .news-new { display: none; }
.news-required-scroll .news-article h2 { font-size: 26px; }
.news-required-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 20px; flex-shrink: 0; padding: 20px 32px; border-top: 1px solid var(--border); }
.news-required-footer p { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.news-required-actions { grid-column: 2; grid-row: 1; }
.news-required-footer .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 210px; min-height: 44px; white-space: normal; }
#news-required-error { grid-column: 1 / -1; }
#news-required-error:empty { display: none; }
#news-required-error:not(:empty) { color: var(--danger); font-size: 13px; }
#news-required-confirm[aria-busy="true"] { opacity: 1; cursor: progress; }
#news-required-confirm[aria-busy="true"]::before { content: ""; width: 12px; height: 12px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@media (max-width: 960px) {
    .news-admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .news-editor { padding: 18px; }
    .news-admin-layout { gap: 24px; }
    .news-preview { padding: 16px; }
    .news-editor-actions { align-items: stretch; flex-direction: column; }
    .news-published .news-article { padding: 20px; }
    .news-required-dialog { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
    .news-required-scroll { flex: 1; padding: 20px; }
    .news-required-header { padding: max(20px, env(safe-area-inset-top)) 20px 16px; }
    .news-required-scroll .news-article h2 { font-size: 23px; }
    .news-required-footer { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); }
    .news-required-footer .btn { width: 100%; min-width: 0; }
    .news-content { padding: 28px 18px max(40px, env(safe-area-inset-bottom)); }
    .news-article { padding: 22px 18px; }
    .news-article h2 { font-size: 21px; }
    .header-resources { gap: 6px; margin-left: auto; }
    .header-resources .help-entry { padding: 7px 9px; gap: 5px; font-size: 13px; }
    .main-header .model-selector { flex-basis: 100%; order: 2; }
    .main-header .provider-warning { order: 3; }
    .main-header .model-chips { flex: 1; }
    .main-header .model-chip { max-width: 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .news-entry { transition: none; }
    .news-entry.has-unread { animation: none; }
    #news-required-confirm[aria-busy="true"]::before { animation: none; }
    .news-required-option .toggle-slider, .news-required-option .toggle-slider::before { transition: none; }
}
