/* ============================================================
   Yangiliklar (v97) — js/news.js (.nws roʻyxat va maqola, .nws-mini bosh sahifa kartasi) va js/news-admin.js (.nwa tahririyat).
   Ikki xost: tashkilot kabineti (body.org-mode — --op-* tokenlari) va xodim paneli (style.css :root, tun — body.dark).
   Oʻqish yuzalari shishasiz (qattiq karta) — matn xira fon ustida turmaydi. Qonun matni: 16.5/1.75, satr ≤ 70ch.
   ============================================================ */
.nws, .nws-mini, .nwa, .nwa-confirm {
  --nw-ink: #142a52; --nw-text: #1b2740; --nw-mute: #56637c; --nw-card: #fff; --nw-card-b: #dce3ee;
  --nw-tint: rgba(31, 59, 115, .045); --nw-tint-h: rgba(31, 59, 115, .085); --nw-field: #fff; --nw-line: rgba(160, 180, 220, .45);
  --nw-link: #2f54a8; --nw-gold-ink: #86650c; --nw-gold-bg: rgba(251, 243, 214, .8); --nw-gold-b: rgba(201, 162, 39, .45);
  --nw-shadow: 0 1px 2px rgba(20, 42, 82, .04), 0 4px 16px rgba(20, 42, 82, .06); --nw-shadow-h: 0 2px 6px rgba(20, 42, 82, .06), 0 14px 32px rgba(20, 42, 82, .12);
  --nw-r: 20px; --nw-r2: 16px; --nw-r3: 12px;
  --nw-err: #8c1d16; --nw-err-bg: rgba(179, 38, 30, .06); --nw-err-b: rgba(179, 38, 30, .28);
  --nw-ok: #17663f; --nw-ok-bg: rgba(21, 115, 71, .08); --nw-ok-b: rgba(21, 115, 71, .3);
  --nw-m: 160ms;
}
body.dark :is(.nws, .nws-mini, .nwa, .nwa-confirm) {
  --nw-ink: #e6ecf9; --nw-text: #d9e1f2; --nw-mute: #a3b4d4; --nw-card: #16223f; --nw-card-b: rgba(140, 165, 215, .22);
  --nw-tint: rgba(120, 145, 195, .1); --nw-tint-h: rgba(120, 145, 195, .18); --nw-field: rgba(14, 23, 48, .72); --nw-line: rgba(120, 145, 195, .3);
  --nw-link: #a9c0f5; --nw-gold-ink: #e9d28a; --nw-gold-bg: rgba(233, 210, 138, .1); --nw-gold-b: rgba(233, 210, 138, .35);
  --nw-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 16px rgba(0, 0, 0, .28); --nw-shadow-h: 0 2px 6px rgba(0, 0, 0, .3), 0 14px 32px rgba(0, 0, 0, .4);
  --nw-err: #ffb4ab; --nw-err-bg: rgba(255, 120, 110, .08); --nw-err-b: rgba(255, 120, 110, .35);
  --nw-ok: #8fe0b5; --nw-ok-bg: rgba(80, 200, 140, .1); --nw-ok-b: rgba(80, 200, 140, .32);
}
body.org-mode :is(.nws, .nws-mini, .nwa, .nwa-confirm) {
  --nw-ink: var(--op-ink); --nw-card: var(--op-card); --nw-card-b: var(--op-card-b); --nw-tint: var(--op-tint); --nw-tint-h: var(--op-tint-h);
  --nw-field: var(--op-field); --nw-line: var(--op-line); --nw-gold-ink: var(--op-gold-ink);
  --nw-r: var(--op-r-card, 20px); --nw-r2: var(--op-r-panel, 16px); --nw-r3: var(--op-r-ctl, 12px); --nw-m: var(--m1, 150ms);
}
.nws, .nws-mini, .nwa { color: var(--nw-text); font-family: 'Inter', system-ui, sans-serif; }
:is(.nws, .nws-mini, .nwa) [hidden] { display: none !important; }
:is(.nws, .nws-mini, .nwa) :where(h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; padding: 0; }
:is(.nws, .nws-mini, .nwa) :where(ul, ol) { list-style: none; }
.nws-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:is(.nws, .nws-mini, .nwa) svg { flex: 0 0 auto; }

/* --- Tugmalar va kichik belgilar --- */
.nws-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--nw-r3);
  font: 700 14px/1 'Inter', sans-serif; color: var(--nw-ink); text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--nw-card); border: 1px solid rgba(31, 59, 115, .22); box-shadow: 0 1px 2px rgba(20, 42, 82, .05);
  transition: background-color var(--nw-m), border-color var(--nw-m), transform var(--nw-m); }
body.dark .nws-btn { border-color: rgba(140, 165, 215, .32); }
.nws-btn:hover { background: var(--nw-tint-h); border-color: rgba(47, 84, 168, .45); }
.nws-btn:active { transform: translateY(1px); }
.nws-btn:disabled { opacity: .6; cursor: default; transform: none; }
.nws-btn svg { width: 16px; height: 16px; }
.nws-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.nws-btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.nws-btn.primary { color: #fff; border-color: transparent; background: linear-gradient(150deg, #1f3b73, #2f54a8); box-shadow: 0 4px 12px rgba(31, 59, 115, .2); }
.nws-btn.primary:hover { background: linear-gradient(150deg, #142a52, #1f3b73); }
.nws-btn.gold { color: #142a52; border-color: transparent; background: linear-gradient(135deg, #f3e3a6, #c9a227); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px rgba(134, 101, 12, .22); }
.nws-btn.gold:hover { background: linear-gradient(135deg, #f6eabd, #d4ad32); }
.nws-btn.danger { color: #9b1c14; border-color: rgba(179, 38, 30, .35); }
body.dark .nws-btn.danger { color: #ffb4ab; border-color: rgba(255, 120, 110, .4); }
.nws-tlink { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; border: 0; background: none; cursor: pointer; text-decoration: none;
  font: 700 13.5px/1.3 'Inter', sans-serif; color: var(--nw-link); border-radius: 8px; }
.nws-tlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.nws-tlink svg { width: 15px; height: 15px; }
@media (pointer: coarse) { .nws-btn, .nws-btn.sm { min-height: 44px; } .nws-tlink { min-height: 44px; } }

.nws-cat { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; white-space: nowrap;
  font: 700 12px/1 'Inter', sans-serif; color: #3d4a63; background: #eceff4; }
.nws-cat::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.nws-cat.c-mehnat { color: #1f3b73; background: #e5ecfa; }
.nws-cat.c-talim { color: #145c3a; background: #def2e7; }
.nws-cat.c-soliq { color: #744b04; background: #fbefd5; }
.nws-cat.c-byudjet { color: #4b2a8a; background: #eee7fb; }
.nws-cat.c-sud { color: #8a1f1f; background: #fbe4e4; }
body.dark .nws-cat { color: #c9d3e6; background: rgba(160, 175, 205, .16); }
body.dark .nws-cat.c-mehnat { color: #bfd1f8; background: rgba(110, 150, 235, .2); }
body.dark .nws-cat.c-talim { color: #a3e2c3; background: rgba(80, 190, 140, .17); }
body.dark .nws-cat.c-soliq { color: #f1d391; background: rgba(233, 180, 80, .17); }
body.dark .nws-cat.c-byudjet { color: #d2bff8; background: rgba(160, 120, 240, .2); }
body.dark .nws-cat.c-sud { color: #f6baba; background: rgba(240, 110, 110, .17); }
.nws-new { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 800 10.5px/1 'Inter', sans-serif; letter-spacing: .06em;
  text-transform: uppercase; color: #142a52; background: linear-gradient(135deg, #f3e3a6, #c9a227); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.nws-lk { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font: 800 11px/1 'Inter', sans-serif; letter-spacing: .03em;
  color: var(--nw-gold-ink); background: var(--nw-gold-bg); border: 1px solid var(--nw-gold-b); }
.nws-lk svg { width: 12px; height: 12px; }
.nws-time { font-variant-numeric: tabular-nums; }
.nws-unread { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; vertical-align: middle;
  font: 800 12px/1 'Inter', sans-serif; letter-spacing: 0; color: #142a52; background: linear-gradient(135deg, #f3e3a6, #c9a227); }

/* --- Roʻyxat koʻrinishi --- */
.nws { display: flex; flex-direction: column; gap: 18px; container: nws / inline-size; }
.nws-listv, .nws-artv { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.nws-listv { max-width: 1000px; }
.nws-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; }
.nws-head-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; color: #e9d28a;
  background: linear-gradient(150deg, #142a52, #2f54a8); box-shadow: 0 10px 22px rgba(20, 42, 82, .24), inset 0 1px 0 rgba(255, 255, 255, .18); }
.nws-head-ic svg { width: 28px; height: 28px; }
.nws-head-t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nws-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.nws-head h1 { font: 800 28px/1.15 'Manrope', 'Inter', sans-serif; letter-spacing: -.015em; color: var(--nw-ink); }
.nws-readall { min-height: 32px; font-size: 13px; }
.nws-head h1:focus { outline: none; }
.nws-head-t > p { max-width: 70ch; font-size: 14px; line-height: 1.5; color: var(--nw-mute); }
.nws-head > .nws-btn { align-self: center; }
@container nws (max-width: 559.98px) {
  .nws-head { grid-template-columns: auto minmax(0, 1fr); }
  .nws-head-ic { width: 44px; height: 44px; border-radius: 13px; }
  .nws-head-ic svg { width: 22px; height: 22px; }
  .nws-head h1 { font-size: 23px; }
  .nws-head > .nws-btn { grid-column: 1 / -1; justify-self: start; }
}
.nws-plan { justify-self: start; align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; padding: 6px 8px 6px 12px;
  border-radius: 999px; font-size: 13px; line-height: 1.35; color: var(--nw-text); background: var(--nw-tint); border: 1px solid var(--nw-card-b); }
.nws-plan > svg { width: 15px; height: 15px; color: var(--nw-ok); }
.nws-plan b { color: var(--nw-ink); }
.nws-plan.free { background: var(--nw-gold-bg); border-color: var(--nw-gold-b); }
.nws-plan.free > svg { color: var(--nw-gold-ink); }
.nws-plan.ok { padding-right: 12px; }
@container nws (max-width: 559.98px) { .nws-plan { border-radius: 14px; padding: 8px 12px; } }

.nws-tools { display: flex; flex-direction: column; gap: 12px; }
.nws-search { position: relative; display: flex; align-items: center; max-width: 560px; }
.nws-search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; color: var(--nw-mute); pointer-events: none; }
.nws-search-ic svg { width: 18px; height: 18px; }
.nws-search input { width: 100%; min-height: 46px; padding: 0 46px 0 44px; border-radius: 14px; font: 400 15px/1.3 'Inter', sans-serif; color: var(--nw-text);
  background: var(--nw-field); border: 1px solid rgba(31, 59, 115, .2); outline: none; -webkit-appearance: none; appearance: none; }
body.dark .nws-search input { border-color: rgba(140, 165, 215, .3); }
.nws-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.nws-search input::placeholder { color: var(--nw-mute); opacity: 1; }
.nws-search input:focus { border-color: #2f54a8; box-shadow: 0 0 0 3px rgba(47, 84, 168, .16); }
.nws-qx { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px;
  color: var(--nw-mute); background: transparent; cursor: pointer; }
.nws-qx:hover { color: var(--nw-ink); background: var(--nw-tint-h); }
.nws-qx svg { width: 16px; height: 16px; }
.nws-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nws-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 8px 0 14px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  font: 600 13.5px/1 'Inter', sans-serif; color: var(--nw-ink); background: var(--nw-card); border: 1px solid var(--nw-card-b);
  transition: background-color var(--nw-m), border-color var(--nw-m), color var(--nw-m); }
.nws-chip:hover { background: var(--nw-tint-h); }
.nws-chip[aria-pressed="true"] { color: #fff; border-color: transparent; background: linear-gradient(150deg, #1f3b73, #2f54a8); box-shadow: 0 4px 12px rgba(31, 59, 115, .2); }
.nws-n { min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 999px; font: 700 12px/1 'Inter', sans-serif;
  font-variant-numeric: tabular-nums; color: var(--nw-ink); background: var(--nw-tint-h); }
.nws-chip[aria-pressed="true"] .nws-n { color: #fff; background: rgba(255, 255, 255, .2); }
@media (pointer: coarse) { .nws-chip { min-height: 44px; } }
@container nws (max-width: 559.98px) {
  .nws-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -2px; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nws-chips::-webkit-scrollbar { display: none; }
}

.nws-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
/* sana guruhi: telefonda yorliq ustida, keng konteynerda chapda (yopishqoq) — vaqt chizigʻi */
.nws-day { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nws-grp { padding: 0 2px; font: 800 12px/1.3 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--nw-mute); }
@container nws (min-width: 820px) {
  .nws-day { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 0 18px; align-items: start; }
  .nws-grp { position: sticky; top: 88px; padding: 20px 0 0; text-align: right; }
  .nws-grp::after { content: ''; display: block; width: 28px; height: 2px; margin: 8px 0 0 auto; border-radius: 2px; background: #c9a227; opacity: .8; }
  .nws-body > .nws-list, .nws-morew, .nws-end { margin-left: 136px; }   /* yorliq ustuni (118) + oraliq (18) */
}
.nws-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.nws-list > li { min-width: 0; }
.nws-card { position: relative; height: 100%; display: flex; flex-direction: column; gap: 9px; padding: 16px 16px 14px; border-radius: var(--nw-r2);
  text-decoration: none; color: var(--nw-text); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow);
  transition: transform var(--nw-m), box-shadow var(--nw-m), border-color var(--nw-m); }
.nws-card:hover { transform: translateY(-2px); border-color: rgba(47, 84, 168, .35); box-shadow: var(--nw-shadow-h); }
.nws-card:focus-visible { outline: 3px solid rgba(47, 84, 168, .6); outline-offset: 2px; }
.nws-card.is-new::before { content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: #c9a227; }
.nws-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--nw-mute); }
.nws-card-top > .nws-lk { margin-left: auto; }
.nws-card-t { font: 700 17px/1.38 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); overflow-wrap: anywhere; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nws-card-s { max-width: 78ch; font-size: 14px; line-height: 1.55; color: var(--nw-mute); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nws-card-s.one { -webkit-line-clamp: 1; }
.nws-card-f { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.nws-card-src { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--nw-mute); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nws-card-src svg { width: 14px; height: 14px; }
.nws-card-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--nw-link); }
.nws-card-go svg { width: 15px; height: 15px; transition: transform var(--nw-m); }
.nws-card:hover .nws-card-go svg { transform: translateX(3px); }
.nws-card.is-sk { gap: 12px; box-shadow: none; }
.nws-promo { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: var(--nw-r2);
  background: linear-gradient(135deg, rgba(251, 243, 214, .95), rgba(243, 227, 166, .6)); border: 1px solid var(--nw-gold-b); }
body.dark .nws-promo { background: linear-gradient(135deg, rgba(233, 210, 138, .13), rgba(233, 210, 138, .05)); }
.nws-promo-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #e9d28a; background: linear-gradient(150deg, #142a52, #2f54a8); }
.nws-promo-ic svg { width: 20px; height: 20px; }
.nws-promo > div { flex: 1 1 280px; min-width: 0; }
.nws-promo b { font: 800 15.5px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-promo p { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: var(--nw-text); }
.nws-morew { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; }
.nws-end { padding: 6px 0 2px; text-align: center; font-size: 13px; color: var(--nw-mute); }
.nws-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px 32px; text-align: center; border-radius: var(--nw-r);
  background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nws-empty-ic { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 16px; color: var(--nw-link); background: var(--nw-tint-h); }
.nws-empty-ic svg { width: 26px; height: 26px; }
.nws-empty b { font: 800 17px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-empty b:focus { outline: none; }
.nws-empty > span:not(.nws-empty-ic) { max-width: 46ch; font-size: 13.5px; line-height: 1.5; color: var(--nw-mute); }
.nws-empty .nws-btn { margin-top: 10px; }
.nws-err { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px; border-radius: var(--nw-r2); font-size: 14px; color: var(--nw-err);
  background: var(--nw-err-bg); border: 1px solid var(--nw-err-b); }
.nws-err > svg { width: 18px; height: 18px; }
.nws-err > span { flex: 1 1 240px; }
.nws-err.sm { padding: 8px 12px; font-size: 13px; }
.nws-sk { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--nw-tint) 25%, var(--nw-tint-h) 50%, var(--nw-tint) 75%); background-size: 200% 100%;
  animation: nwsSk 1.3s linear infinite; }
.nws-sk.a { width: 34%; height: 22px; }
.nws-sk.h { width: 82%; height: 30px; margin: 6px 0 4px; }
.nws-sk.b { width: 100%; height: 16px; }
.nws-sk.c { width: 62%; height: 16px; }
@keyframes nwsSk { to { background-position: -200% 0; } }

/* --- Maqola --- */
.nws-art { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 860px; }
.nws-art-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@container nws (max-width: 419.98px) {
  .nws-share { width: 44px; justify-content: center; }
  .nws-share span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.nws-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; text-decoration: none;
  font: 700 14px/1 'Inter', sans-serif; color: var(--nw-ink); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nws-back:hover { background: var(--nw-tint-h); }
.nws-back svg { width: 17px; height: 17px; transition: transform var(--nw-m); }
.nws-back:hover svg { transform: translateX(-2px); }
@media (pointer: coarse) { .nws-back { min-height: 44px; } }
.nws-paper { display: flex; flex-direction: column; gap: 22px; padding: 32px 40px 28px; border-radius: var(--nw-r); background: var(--nw-card);
  border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nws-paper.is-sk { gap: 12px; }
@container nws (max-width: 639.98px) { .nws-paper { gap: 18px; padding: 22px 18px 20px; } }
.nws-art-h { display: flex; flex-direction: column; gap: 12px; }
.nws-art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nws-art-h h1 { font: 800 30px/1.22 'Manrope', 'Inter', sans-serif; letter-spacing: -.015em; color: var(--nw-ink); text-wrap: balance; overflow-wrap: anywhere; }
.nws-art-h h1:focus { outline: none; }
@container nws (max-width: 639.98px) { .nws-art-h h1 { font-size: 23px; line-height: 1.25; } }
.nws-lead { max-width: 68ch; padding-left: 14px; border-left: 3px solid #c9a227; font-size: 17px; line-height: 1.6; color: var(--nw-text); text-wrap: pretty; overflow-wrap: anywhere; }
@container nws (max-width: 639.98px) { .nws-lead { font-size: 16px; } }
.nws-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 14px; border-top: 1px solid var(--nw-line); }
.nws-facts > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nws-facts dt { font: 700 11px/1.3 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--nw-mute); }
.nws-facts dd { font-size: 14.5px; font-weight: 600; color: var(--nw-ink); font-variant-numeric: tabular-nums; }
.nws-facts a { display: inline-flex; align-items: center; gap: 5px; color: var(--nw-link); text-decoration: underline; text-underline-offset: 3px; }
.nws-facts a svg { width: 13px; height: 13px; }

/* qonun matni */
.nws-text { max-width: 70ch; font-size: 16.5px; line-height: 1.75; color: var(--nw-text); text-wrap: pretty; overflow-wrap: break-word; }
.nws-text > * + * { margin-top: .85em; }
.nws-text h2 { display: flex; align-items: center; gap: 10px; margin-top: 1.7em; font: 800 19px/1.35 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-text h3 { margin-top: 1.4em; font: 700 17px/1.4 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-text > :first-child { margin-top: 0; }
.nws-text h2 + *, .nws-text h3 + * { margin-top: .5em; }
.nws-sec-ic { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #e9d28a; background: linear-gradient(150deg, #142a52, #2f54a8); }
.nws-sec-ic svg { width: 17px; height: 17px; }
.nws-text :is(ul, ol) { padding-left: 1.4em; }
.nws-text ul { list-style: disc; }
.nws-text ol { list-style: decimal; }
.nws-text li + li { margin-top: .4em; }
.nws-text li { padding-left: .2em; }
.nws-text ul > li::marker { color: #c9a227; }
.nws-text ol > li::marker { color: var(--nw-link); font-weight: 700; }
.nws-text blockquote { padding: 12px 16px; border-left: 3px solid #2f54a8; border-radius: 0 12px 12px 0; background: var(--nw-tint); color: var(--nw-text); }
.nws-text blockquote p + p { margin-top: .6em; }
.nws-text a { color: var(--nw-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.nws-text a:hover { text-decoration-thickness: 2px; }
.nws-text strong { font-weight: 700; color: var(--nw-ink); }
.nws-text hr { height: 0; border: 0; border-top: 1px solid var(--nw-line); margin: 1.6em 0; }
.nws-nobody { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--nw-mute); }
.nws-nobody svg { width: 16px; height: 16px; }

/* Bepul: qulf */
.nws-locked { position: relative; display: flex; flex-direction: column; }
.nws-ghost { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 0; -webkit-mask-image: linear-gradient(#000 10%, transparent 92%); mask-image: linear-gradient(#000 10%, transparent 92%); }
.nws-ghost span { display: block; height: 14px; border-radius: 7px; background: var(--nw-tint-h); }
.nws-ghost span:nth-child(3n + 1) { width: 96%; } .nws-ghost span:nth-child(3n + 2) { width: 88%; } .nws-ghost span:nth-child(3n) { width: 72%; }
.nws-ghost span:nth-child(4) { width: 40%; height: 18px; margin-top: 8px; background: var(--nw-line); }
.nws-lockcard { position: relative; margin: -72px auto 0; width: min(520px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 22px 22px;
  text-align: center; border-radius: var(--nw-r); background: var(--nw-card); border: 1px solid var(--nw-gold-b);
  box-shadow: 0 12px 34px rgba(20, 42, 82, .14), inset 0 3px 0 #c9a227; }
.nws-lockcard-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #142a52; background: linear-gradient(135deg, #f3e3a6, #c9a227); }
.nws-lockcard-ic svg { width: 22px; height: 22px; }
.nws-lockcard h2 { font: 800 20px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-lockcard ul { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.nws-lockcard li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--nw-text); }
.nws-lockcard li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--nw-ok); }
.nws-lockcard .nws-btn { margin-top: 4px; }
@container nws (max-width: 479.98px) { .nws-lockcard .nws-btn { width: 100%; } }

.nws-source { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: var(--nw-r2); background: var(--nw-tint); border: 1px solid var(--nw-card-b); }
.nws-source-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--nw-link); background: var(--nw-card); border: 1px solid var(--nw-card-b); }
.nws-source-ic svg { width: 19px; height: 19px; }
.nws-source > div { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nws-source b { font-size: 14.5px; color: var(--nw-ink); }
.nws-source > div > span { font-size: 13px; color: var(--nw-mute); overflow-wrap: anywhere; }
.nws-disc { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--nw-mute); }
.nws-disc svg { width: 15px; height: 15px; margin-top: 1px; }
.nws-others { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.nws-others h2 { font: 800 18px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-others ul { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@container nws (min-width: 760px) { .nws-others ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nws-others .nws-mini-row { height: 100%; background: var(--nw-card); border-color: var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nws-others .nws-mini-row:hover { border-color: rgba(47, 84, 168, .35); }
.nws-others .nws-mini-t { -webkit-line-clamp: 3; }

/* --- Bosh sahifa kartasi: «Soʻnggi yangiliklar» --- */
.nws-mini { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--nw-r); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nws-mini-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nws-mini-h h2 { display: flex; align-items: center; gap: 8px; font: 800 17px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nws-mini-h h2 svg { width: 20px; height: 20px; color: var(--nw-link); }
.nws-mini-h .nws-unread { height: 22px; padding: 0 8px; font-size: 11.5px; }
.nws-mini ul { display: flex; flex-direction: column; gap: 6px; }
.nws-mini-row { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 40px 10px 12px; border-radius: 12px; text-decoration: none; color: var(--nw-text);
  background: var(--nw-tint); border: 1px solid transparent; transition: background-color var(--nw-m), border-color var(--nw-m); }
.nws-mini-row:hover { background: var(--nw-tint-h); border-color: rgba(47, 84, 168, .22); }
.nws-mini-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--nw-mute); }
.nws-mini-top .nws-cat { height: 22px; font-size: 11.5px; }
.nws-mini-top .nws-new { height: 18px; font-size: 10px; }
.nws-mini-t { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--nw-ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nws-mini-lk { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  color: var(--nw-gold-ink); background: var(--nw-gold-bg); border: 1px solid var(--nw-gold-b); }
.nws-mini-lk svg { width: 12px; height: 12px; }
.nws-mini-empty { padding: 8px 2px; font-size: 13.5px; color: var(--nw-mute); }

/* ============================================================
   Tahririyat (.nwa) — js/news-admin.js
   ============================================================ */
.nwa { display: flex; flex-direction: column; gap: 18px; container: nwa / inline-size; }
.nwa-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.nwa-head > div:first-child { min-width: 0; flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.nwa-head h1 { font: 800 26px/1.2 'Manrope', 'Inter', sans-serif; letter-spacing: -.01em; color: var(--nw-ink); }
.nwa-head h1:focus { outline: none; }
.nwa-head p { max-width: 72ch; font-size: 14px; line-height: 1.5; color: var(--nw-mute); }
.nwa-panel { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--nw-r); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nwa-panel h2 { display: flex; align-items: center; gap: 8px; font: 800 16px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nwa-panel h2 svg { width: 18px; height: 18px; color: var(--nw-link); }
.nwa-ai-row { display: flex; flex-wrap: wrap; gap: 10px; }
.nwa-ai-row input { flex: 1 1 320px; min-width: 0; }
.nwa-hint { font-size: 12.5px; line-height: 1.5; color: var(--nw-mute); }
.nwa-msg:empty { display: none; }
.nwa-msg { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.nwa-msg svg { width: 16px; height: 16px; margin-top: 1px; }
.nwa-msg.err { color: var(--nw-err); background: var(--nw-err-bg); border: 1px solid var(--nw-err-b); }
.nwa-msg.ok { color: var(--nw-ok); background: var(--nw-ok-bg); border: 1px solid var(--nw-ok-b); }
.nwa-msg.wait { color: var(--nw-text); background: var(--nw-tint); border: 1px solid var(--nw-card-b); }
.nwa-spin { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; border-radius: 50%; border: 2px solid var(--nw-line); border-top-color: #2f54a8; animation: nwaSpin .8s linear infinite; }
@keyframes nwaSpin { to { transform: rotate(360deg); } }

.nwa-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.nwa-list { display: flex; flex-direction: column; gap: 8px; }
.nwa-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 14px 14px 14px 16px; border-radius: var(--nw-r2);
  text-align: left; cursor: pointer; font: inherit; color: var(--nw-text); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow);
  transition: border-color var(--nw-m), box-shadow var(--nw-m); }
.nwa-row:hover { border-color: rgba(47, 84, 168, .35); box-shadow: var(--nw-shadow-h); }
.nwa-row-t { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nwa-row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--nw-mute); }
.nwa-row-n { font: 700 15.5px/1.38 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nwa-row-s { font-size: 13px; line-height: 1.45; color: var(--nw-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nwa-row > svg { width: 18px; height: 18px; color: var(--nw-mute); }
.nwa-st { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 800 11px/1 'Inter', sans-serif; letter-spacing: .03em; }
.nwa-st.draft { color: #744b04; background: #fbefd5; }
.nwa-st.published { color: #145c3a; background: #def2e7; }
.nwa-st.archived { color: #4a556b; background: #e9ecf2; }
body.dark .nwa-st.draft { color: #f1d391; background: rgba(233, 180, 80, .17); }
body.dark .nwa-st.published { color: #a3e2c3; background: rgba(80, 190, 140, .17); }
body.dark .nwa-st.archived { color: #c9d3e6; background: rgba(160, 175, 205, .16); }
.nwa-ai-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font: 800 11px/1 'Inter', sans-serif;
  color: #2f54a8; background: rgba(47, 84, 168, .1); }
body.dark .nwa-ai-chip { color: #a9c0f5; background: rgba(110, 150, 235, .18); }
.nwa-ai-chip svg { width: 12px; height: 12px; }
.nwa-aud { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font: 700 11px/1 'Inter', sans-serif; color: var(--nw-ink); background: var(--nw-tint-h); }
.nwa-ingest { display: flex; align-items: center; gap: 6px; font-size: 12.5px !important; color: var(--nw-mute); }
.nwa-ingest::before { content: ''; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #1f9d5c; }
.nwa-ingest.err { color: var(--nw-err); }
.nwa-ingest.err::before { background: #c0392b; }
.nwa-msg-acts { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.nwa-msg > span { min-width: 0; }

/* muharrir */
.nwa-ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@container nwa (min-width: 1080px) { .nwa-ed { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .nwa-pvtabs { display: none !important; } }
@container nwa (max-width: 1079.98px) { .nwa-ed[data-pane="edit"] .nwa-pv, .nwa-ed[data-pane="preview"] .nwa-form { display: none; } }
.nwa-edtop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.nwa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--nw-mute); }
.nwa-form { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--nw-r); background: var(--nw-card); border: 1px solid var(--nw-card-b); box-shadow: var(--nw-shadow); }
.nwa-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nwa-f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@container nwa (max-width: 559.98px) { .nwa-f-row { grid-template-columns: minmax(0, 1fr); } }
.nwa-f > label, .nwa-lab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 700 13.5px/1.3 'Inter', sans-serif; color: var(--nw-ink); }
.nwa-f > label i { font-style: normal; font-weight: 600; color: var(--nw-mute); }
.nwa-cnt { font: 600 12px/1 'Inter', sans-serif; color: var(--nw-mute); font-variant-numeric: tabular-nums; }
.nwa-cnt.over { color: var(--nw-err); }
.nwa input[type="text"], .nwa input[type="url"], .nwa input[type="date"], .nwa select, .nwa textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; font: 400 15px/1.45 'Inter', sans-serif; color: var(--nw-text);
  background: var(--nw-field); border: 1px solid rgba(31, 59, 115, .22); outline: none; -webkit-appearance: none; appearance: none; }
body.dark .nwa :is(input, select, textarea) { border-color: rgba(140, 165, 215, .3); color-scheme: dark; }
.nwa select { padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.nwa textarea { resize: vertical; }
.nwa textarea.nwa-sum { min-height: 96px; }
.nwa textarea.nwa-bodyin { min-height: 360px; font: 400 14.5px/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; tab-size: 2; }
.nwa :is(input, select, textarea):focus { border-color: #2f54a8; box-shadow: 0 0 0 3px rgba(47, 84, 168, .16); }
.nwa :is(input, select, textarea)[aria-invalid="true"] { border-color: rgba(179, 38, 30, .7); box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.nwa-ferr { font-size: 12.5px; font-weight: 600; color: var(--nw-err); }
.nwa-ferr:empty { display: none; }
.nwa-tb { display: flex; flex-wrap: wrap; gap: 6px; }
.nwa-tb button { min-height: 34px; padding: 0 10px; border-radius: 9px; cursor: pointer; font: 700 12.5px/1 'Inter', sans-serif; color: var(--nw-ink);
  background: var(--nw-tint); border: 1px solid var(--nw-card-b); }
.nwa-tb button:hover { background: var(--nw-tint-h); }
.nwa-tb button.wide { color: var(--nw-link); }
@media (pointer: coarse) { .nwa-tb button { min-height: 40px; } }
.nwa-slug { font-size: 12.5px; color: var(--nw-mute); overflow-wrap: anywhere; }
.nwa-slug code { font: 600 12.5px/1.4 ui-monospace, Menlo, monospace; color: var(--nw-ink); }
.nwa-foot { position: sticky; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; margin: 4px -20px -20px; padding: 14px 20px;
  border-top: 1px solid var(--nw-line); border-radius: 0 0 var(--nw-r) var(--nw-r); background: var(--nw-card); }
.nwa-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nwa-acts .sp { flex: 1 1 auto; }
.nwa-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  color: var(--nw-text); background: var(--nw-gold-bg); border: 1px solid var(--nw-gold-b); }
.nwa-confirm > span { flex: 1 1 220px; }
.nwa-confirm b { color: var(--nw-ink); }
.nwa-pv { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nwa-pv-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.nwa-pv-h h2 { font: 800 15px/1.3 'Manrope', 'Inter', sans-serif; color: var(--nw-ink); }
.nwa-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--nw-tint-h); }
.nwa-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 9px; cursor: pointer; font: 700 12.5px/1 'Inter', sans-serif; color: var(--nw-mute); background: transparent; }
.nwa-seg button[aria-pressed="true"] { color: var(--nw-ink); background: var(--nw-card); box-shadow: 0 1px 3px rgba(20, 42, 82, .12); }
@media (pointer: coarse) { .nwa-seg button { min-height: 40px; } }
.nwa-pv-box { max-height: calc(100vh - 170px); overflow: auto; border-radius: var(--nw-r); overscroll-behavior: contain; }
@container nwa (max-width: 1079.98px) { .nwa-pv { position: static; } .nwa-pv-box { max-height: none; overflow: visible; } }
.nwa-pv-box .nws { gap: 12px; }
.nwa-pv-box .nws-art { max-width: none; }
.nwa-pv-box .nws-pv .nws-card { pointer-events: none; }
.nwa-pvtabs { display: flex; flex: 1 1 100%; }
.nwa-pvtabs button { flex: 1 1 0; }

/* --- Harakat va chop etish --- */
@media (prefers-reduced-motion: reduce) {
  :is(.nws, .nws-mini, .nwa) *, :is(.nws, .nws-mini, .nwa) *::before { transition: none !important; animation: none !important; }
  .nws-card:hover { transform: none; }
}
@media print {
  .nws-tools, .nws-art-nav, .nws-others, .nws-promo, .nws-source .nws-btn, .nwa-foot, .nwa-tb { display: none !important; }
  .nws-paper, .nws-card { box-shadow: none; border-color: #ccc; }
  .nws-text { font-size: 12pt; color: #000; max-width: none; }
}
