/* Public news: paper, readable conversations, no decoration under text. */
.page-news .news-heading { align-items: center; }
.news-heading-actions { display: grid; justify-items: end; gap: 10px; flex-shrink: 0; }
.news-search { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.news-search input { flex: 1; }
.news-filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.news-filter-tabs a { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; }
.news-filter-tabs a[aria-current] { color: var(--primary); border-color: var(--berry); }
.news-filter-tabs > span { margin-left: auto; font-size: .82rem; color: var(--muted); }
.news-feed { display: grid; gap: 24px; }
.news-post { min-width: 0; padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: 3px 10px 10px 3px; border-left: 3px solid var(--field-deep); }
.news-post-pinned { border-left-color: var(--berry); }
.news-avatar { flex: 0 0 42px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); border: 1px solid var(--line); border-radius: 50%; font-weight: 650; font-size: .85rem; }
.news-pin { margin-left: auto; color: var(--berry); font-size: .76rem; font-weight: 650; }
.page-news .news-post h2 { font-size: 1.45rem; line-height: 1.35; margin: 18px 0 12px; overflow-wrap: anywhere; }
.news-post h2 > a { color: var(--heading); }
.page-news .news-post h1 { margin: 22px 0 16px; overflow-wrap: anywhere; }
.news-excerpt { white-space: pre-line; line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 18px; }
.news-post-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.news-comment-link, .news-manage-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--primary); font-weight: 600; gap: 12px; }
.news-reactions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.news-reactions form { margin: 0; }
.news-reaction { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 7px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; color: var(--muted); font-size: .86rem; cursor: pointer; }
.news-reaction > span:first-child { font-size: 1.08rem; }
.news-reaction:hover { border-color: var(--primary); background: var(--field); }
.news-reaction.is-selected { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 650; }
span.news-reaction { cursor: default; }
.news-reaction:disabled { opacity: .65; cursor: progress; }
.news-reaction-inspect { font-size: .76rem; padding: 6px; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); }
.news-emoji-picker, .news-comment-menu { position: relative; }
.news-emoji-picker > summary, .news-comment-menu > summary { list-style: none; display: flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--primary); border: 1px solid var(--line); border-radius: 50%; font-weight: 600; }
.news-emoji-picker > summary::-webkit-details-marker, .news-comment-menu > summary::-webkit-details-marker { display: none; }
.news-emoji-picker[open] > summary, .news-comment-menu[open] > summary { background: var(--primary-soft); }
.news-emoji-menu { position: absolute; bottom: calc(100% + 8px); left: 0; width: max-content; max-width: 192px; display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; padding: 10px; background: #fff; border: 1px solid var(--control-border); box-shadow: 0 5px 18px #34313b1a; border-radius: 10px; z-index: 5; }
.news-rich-text { overflow-wrap: anywhere; }
.news-rich-text pre { max-width: 100%; overflow: auto; background: var(--field); padding: 14px; border: 1px solid var(--line); border-radius: 5px; }
.news-rich-text blockquote { margin: 16px 0; padding: 2px 18px; border-left: 3px solid var(--primary); color: var(--muted); background: var(--field); }
.news-discussion { margin-top: 32px; scroll-margin-top: 24px; }
.news-discussion-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.page-news .news-discussion-heading h2 { font-size: 1.35rem; margin: 0; }
.news-discussion-heading h2 span { color: var(--muted); margin-left: 7px; font: .9rem 'Golos', sans-serif; }
.news-plain-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 10px; color: var(--primary); background: transparent; border: 0; cursor: pointer; font-size: .86rem; }
.news-refresh { display: block; width: 100%; margin-top: 16px; }
.news-refresh[hidden] { display: none; }
.news-comment { display: flex; align-items: flex-start; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.news-comment:target { background: var(--field); outline: 2px solid var(--primary); outline-offset: 7px; }
.news-avatar-small { flex-basis: 36px; width: 36px; height: 36px; font-size: .75rem; }
.news-comment-content { min-width: 0; flex: 1; }
.news-comment-content > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin: 1px 0 9px; }
.news-comment-content > header strong { font-size: .9rem; overflow-wrap: anywhere; }
.news-comment-content time { color: var(--muted); font-size: .74rem; }
.news-comment-own .news-avatar { background: var(--field-deep); }
.news-comment-text { line-height: 1.55; overflow-wrap: anywhere; }
.news-quote { display: grid; gap: 3px; margin: 8px 0 12px; padding: 8px 12px; border-left: 3px solid var(--primary); background: var(--field); color: var(--text); border-radius: 0 5px 5px 0; text-decoration: none; font-size: .82rem; overflow-wrap: anywhere; }
.news-quote strong { color: var(--primary); }
.news-quote:hover { background: var(--primary-soft); text-decoration: none; }
.news-comment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.news-comment-menu { margin-left: auto; }
.news-comment-menu > summary { border: 0; border-radius: 6px; letter-spacing: 2px; }
.news-comment-menu > div { position: absolute; right: 0; bottom: calc(100% + 5px); width: 185px; z-index: 6; padding: 5px; border: 1px solid var(--control-border); border-radius: 7px; background: #fff; box-shadow: 0 5px 18px #34313b1a; }
.news-comment-menu a, .news-comment-menu button { display: flex; align-items: center; padding: 8px 10px; min-height: 44px; width: 100%; background: transparent; border: 0; text-align: left; font-size: .86rem; cursor: pointer; border-radius: 4px; }
.news-comment-menu a:hover, .news-comment-menu button:hover { background: var(--field); text-decoration: none; }
.news-older { display: inline-flex; align-items: center; min-height: 44px; font-size: .86rem; margin-right: 16px; }
.news-comments-empty { padding: 30px 0; color: var(--muted); }
.news-comments-empty strong { color: var(--heading); }
.news-comments-empty p { margin-bottom: 0; }
.news-compose { margin-top: 22px; padding: 18px; border: 1px solid var(--control-border); border-radius: 8px; background: #fff; }
.news-compose > label { display: block; margin: 0 0 8px; font-weight: 600; font-size: .9rem; }
.news-compose textarea { min-height: 80px; max-height: 320px; line-height: 1.5; resize: vertical; }
.news-compose-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.news-compose-hint { font-size: .73rem; color: var(--muted); flex: 1; }
.news-counter { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.news-counter.is-long { color: var(--danger); }
.news-form-error { padding: 10px 12px; background: #fff3f3; color: var(--danger); border-left: 3px solid var(--danger); font-size: .86rem; margin: 12px 0; }
.news-form-error[hidden] { display: none; }
.news-reply-compose { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0 10px 12px; margin-bottom: 12px; border-left: 3px solid var(--primary); font-size: .83rem; }
.news-reply-compose[hidden] { display: none; }
.news-reply-compose > div { min-width: 0; display: grid; gap: 3px; }
.news-reply-compose strong { color: var(--primary); }
.news-reply-compose span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-reply-compose button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--primary); font-size: 1.4rem; cursor: pointer; }
.news-inline-compose { margin: 10px 0 0; background: var(--field); }
.news-notice { border-left: 3px solid var(--line); padding: 12px 16px; background: var(--field); color: var(--muted); font-size: .88rem; }
.news-live-status { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: min(580px, calc(100vw - 32px)); width: max-content; padding: 11px 17px; background: #fff; color: var(--text); border: 1px solid var(--control-border); border-radius: 8px; box-shadow: 0 5px 24px #34313b24; font-size: .87rem; overflow-wrap: anywhere; }
.news-live-status:empty { display: none; }
.news-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 28px 0; }
.news-manage-search { display: grid; grid-template-columns: minmax(160px, 1fr) 150px minmax(180px, 240px) auto; }
.news-admin-row { display: flex; align-items: center; gap: 24px; justify-content: space-between; border-top: 1px solid var(--line); padding: 22px 0; }
.news-admin-row > div { min-width: 0; }
.news-admin-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .75rem; }
.page-news .news-admin-row h2 { font-size: 1.1rem; margin: 10px 0 5px; overflow-wrap: anywhere; }
.news-admin-row p { color: var(--muted); font-size: .8rem; margin: 0; }
.news-admin-actions { display: grid; flex-shrink: 0; gap: 8px; justify-items: end; font-size: .83rem; }
.news-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 24px; }
.news-editor-main { min-width: 0; }
.news-post-editor label:not(.news-checkbox) { display: block; font-weight: 600; font-size: .89rem; margin: 16px 0 8px; }
.news-editor-main > label:first-child { margin-top: 0; }
.news-editor-main textarea { min-height: 310px; line-height: 1.6; border-radius: 0 0 5px 5px; }
.news-format-bar { display: flex; flex-wrap: wrap; align-items: center; border: 1px solid var(--control-border); border-bottom: 0; border-radius: 5px 5px 0 0; padding: 3px; background: var(--field); }
.news-format-bar[hidden] { display: none; }
.news-format-bar button { min-width: 44px; min-height: 44px; padding: 6px 9px; border: 0; background: transparent; color: var(--primary); border-radius: 4px; cursor: pointer; font-size: .82rem; }
.news-format-bar button:hover { background: #fff; }
.news-format-bar button:disabled { opacity: .45; cursor: default; }
.news-editor-text-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .72rem; margin-top: 7px; }
.news-editor-settings { padding: 18px; align-self: start; background: var(--field); border: 1px solid var(--line); border-radius: 6px; }
.page-news .news-editor-settings h2 { font-size: 1.1rem; margin: 0; }
.news-editor-settings select { font-size: .86rem; }
.news-audience-note, .news-editor-state { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.news-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: .86rem; margin-top: 20px; }
.news-checkbox input { flex-shrink: 0; }
.news-markdown-help { margin-top: 12px; font-size: .78rem; color: var(--muted); }
.news-markdown-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--primary); }
.news-markdown-help code { font-size: .75rem; }
.news-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; margin-top: 10px; background: var(--surface); border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 7; }
.news-editor-shortcuts { color: var(--muted); font-size: .75rem; margin-left: auto; }
.news-editor-preview { margin-top: 18px; }
.news-editor-preview[hidden] { display: none; }
.news-preview-label { color: var(--berry); font-size: .79rem; font-weight: 600; }
@media (max-width: 1199px) {
  .news-editor-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 18px; }
  .news-manage-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .news-comment, .news-discussion, #comment-body { scroll-margin-top: 110px; }
  .news-heading-actions { justify-items: start; }
  .news-search { flex-wrap: wrap; gap: 8px; }
  .news-search input { flex-basis: 190px; }
  .news-filter-tabs { gap: 0 14px; margin-bottom: 18px; }
  .news-filter-tabs a { font-size: .85rem; }
  .news-filter-tabs > span { display: none; }
  .news-feed { gap: 18px; }
  .news-post { padding: 18px 15px; }
  .news-pin { font-size: .7rem; }
  .page-news .news-post h2 { font-size: 1.25rem; }
  .news-post-bottom { gap: 6px; }
  .news-reactions { gap: 5px; }
  .news-reaction { padding: 7px 9px; }
  .news-comment-link { width: 100%; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
  .news-comment { gap: 9px; }
  .news-avatar-small { flex-basis: 30px; width: 30px; height: 30px; font-size: .66rem; }
  .news-comment-content > header { display: grid; }
  .news-comment-actions { gap: 0; }
  .news-compose { padding: 13px; }
  .news-compose-hint { flex-basis: 100%; order: 3; font-size: .69rem; }
  .news-compose-bottom .news-counter { margin-left: 0; margin-right: auto; }
  .news-compose-bottom > .button { padding: 9px 12px; }
  .news-inline-compose { padding: 10px; }
  .news-comment .news-emoji-menu { left: 0; right: auto; }
  .news-editor-layout { grid-template-columns: minmax(0, 1fr); }
  .news-editor-settings { padding: 15px; }
  .news-editor-actions { position: static; }
  .news-editor-actions > .button { flex: 1 1 130px; }
  .news-editor-shortcuts { display: none; }
  .news-manage-search { grid-template-columns: minmax(0, 1fr); }
  .news-admin-row { align-items: stretch; flex-direction: column; gap: 13px; }
  .news-admin-actions { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) { .page-news * { scroll-behavior: auto; } }

/* News and discussion stay on one calm reading column. */
.page-news-feed .news-heading { align-items: flex-start; }
.news-heading-actions > a:not(.button) { min-height: 44px; display: inline-flex; align-items: center; font-size: .8125rem; }
.news-search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--muted); font-size: .875rem; }
.news-feed { gap: 18px; }
.news-feed-card { min-width: 0; padding: 22px 26px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.news-feed-card-pinned { border-left: 3px solid var(--berry); background: linear-gradient(110deg, #fbf6f8, #fff 65%); }
.news-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: .8125rem; }
.news-pin { display: inline-flex; align-items: center; gap: 5px; }
.news-pin svg { width: 16px; height: 16px; }
.page-news .news-feed-card h2 { font-size: 1.4rem; line-height: 1.45; margin: 12px 0 10px; overflow-wrap: anywhere; }
.news-feed-card h2 a { color: var(--heading); text-decoration: none; }
.news-feed-card h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.news-card-excerpt { max-width: 74ch; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.news-card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.news-card-comments, .news-card-read { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .875rem; text-decoration: none; }
.news-card-comments svg { width: 18px; height: 18px; }
.news-reading-column { max-width: 820px; margin-inline: auto; }
.news-post-detail { padding: 26px 30px; }
.page-news .news-post-detail h1 { font-size: clamp(1.6rem, 2.6vw, 2.05rem); line-height: 1.4; margin: 24px 0 20px; }
.news-post-detail .news-rich-text { font-size: 1rem; line-height: 1.8; }
.news-discussion { margin-top: 30px; }
.news-discussion-heading { padding-bottom: 14px; }
.news-compose { margin-top: 16px; margin-bottom: 8px; border-color: var(--line); border-top: 3px solid var(--primary); border-radius: 4px; padding: 18px 20px; }
.news-compose textarea { border-color: var(--line); background: var(--surface); min-height: 96px; }
.news-comment { gap: 14px; padding: 22px 4px; }
.news-comment-content > header { justify-content: flex-start; align-items: center; }
.news-comment-content > header > strong { font-weight: 600; }
.news-comment-content .tag { font-size: .6875rem; font-weight: 500; padding: 2px 6px; margin-left: 4px; background: var(--field); }
.news-comment-text { font-size: .9375rem; line-height: 1.65; }
.news-comment-actions { gap: 6px; }
.news-comment-menu { margin-left: auto; }
.news-comment-menu > summary { color: var(--muted); }
.news-comment-menu[open] > summary { color: var(--primary); }
.news-post-tools { position: relative; margin-left: auto; }
.news-post-tools > summary { display: flex; align-items: center; min-height: 44px; gap: 8px; color: var(--primary); cursor: pointer; font-size: .8125rem; }
.news-post-tools > summary::after { content: "⌄"; }
.news-post-tools > div { position: absolute; right: 0; top: calc(100% + 4px); width: 230px; max-width: calc(100vw - 60px); background: #fff; border: 1px solid var(--control-border); border-radius: 6px; padding: 5px; box-shadow: 0 5px 18px #34313b1a; z-index: 6; }
.news-post-tools a { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; font-size: .8125rem; }
.news-post-tools a:hover { background: var(--field); }
.news-emoji-picker > summary { border-style: dashed; color: var(--muted); }
.news-emoji-picker > summary svg { width: 22px; height: 22px; }
.news-reaction-inspect { text-decoration: none; }
.news-compose #guest-name { max-width: 360px; }
@media (max-width: 767px) {
  .page-news-feed .news-heading { gap: 12px; }
  .news-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
  .news-heading-actions .button { font-size: .875rem; }
  .news-feed-card { padding: 18px 16px; }
  .page-news .news-feed-card h2 { font-size: 1.2rem; margin-top: 10px; }
  .news-card-excerpt { font-size: .875rem; }
  .news-card-bottom { gap: 6px 14px; }
  .news-card-read { margin-left: auto; }
  .news-post-detail { padding: 20px 16px; }
  .page-news .news-post-detail h1 { margin-top: 20px; font-size: 1.5rem; }
  .news-post-detail .news-rich-text { font-size: .9375rem; }
  .news-compose { padding: 15px 12px; }
  .news-compose-hint { display: none; }
  .news-comment { gap: 9px; padding-inline: 0; }
  .news-comment-content > header { display: grid; gap: 4px; }
  .news-comment-actions { gap: 4px; }
  .news-comment .news-reactions { max-width: 100%; }
  .news-quote { padding-inline: 9px; }
  .news-discussion-heading .news-plain-action { padding-inline: 0; }
}

.news-post-tools > summary::-webkit-details-marker { display: none; }

.news-delete-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 24px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 16px 60px #34324d30; }
.news-delete-dialog::backdrop { background: #34324d66; }
.news-delete-dialog h2 { margin: 0 0 18px; font-size: 1.35rem; }
.news-delete-preview { padding: 12px 15px; background: var(--field); border-left: 3px solid var(--primary); overflow-wrap: anywhere; font-size: .875rem; }
.news-delete-preview p { margin: 6px 0 0; white-space: pre-line; }
.news-delete-dialog form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 767px) { .news-delete-dialog { padding: 20px 16px; } }
