/* NewsOmo Рада — компоненти вертикалі. Кольори, шрифти, відступи — лише з tokens.css (NewsOmo + доповнення). Префікс nr-. */

[data-vertical="rada"] { --accent: var(--accent-rada); --on-accent: var(--on-accent-rada); --accent-surface: var(--rada-surface); }
.nr, .nr * { box-sizing: border-box; }
.nr { font-family: var(--font-sans); color: var(--fg1); -webkit-font-smoothing: antialiased; }
.nr :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.nr a { color: var(--accent-rada); text-decoration: none; }
.nr-billno { font-family: var(--font-mono); font-size: 15px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nr-meta { font-size: 13px; line-height: 1.45; color: var(--fg2); }
.nr-label { font-size: 11px; line-height: 1.2; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg2); }
.nr-dotsep::before { content: "·"; margin: 0 6px; color: var(--fg3); }

/* ---------- Chips: етап, результат, програма, фільтр */
.nr-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; line-height: 1.2; font-weight: 600; background: var(--paper-sunk); color: var(--fg1); white-space: nowrap; }
.nr-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--phase-registered); }
.nr-chip--program { background: transparent; border: 1px solid var(--line-strong); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; min-height: 22px; }
.nr-chip--adopted { color: var(--res-adopted); } .nr-chip--rejected { color: var(--res-rejected); } .nr-chip--pending { color: var(--res-pending); }
.nr-chip--blocking { background: transparent; border: 1px solid var(--res-rejected); color: var(--res-rejected); }
.nr-chip--accent { background: var(--rada-surface); color: var(--accent-rada); }
[data-phase="registered"] i, i[data-phase="registered"] { background: var(--phase-registered); }
[data-phase="committee"] i, i[data-phase="committee"] { background: var(--phase-committee); }
[data-phase="plenary"] i, i[data-phase="plenary"] { background: var(--phase-plenary); }
[data-phase="signing"] i, i[data-phase="signing"] { background: var(--phase-signing); }
[data-phase="in-force"] i, i[data-phase="in-force"] { background: var(--phase-in-force); }
[data-phase="off"] i, i[data-phase="off"] { background: var(--phase-off); }

/* ---------- ChipBar: фільтри, горизонтальна прокрутка зі склом */
.nr-chipbar { display: flex; gap: var(--sp-2); overflow-x: auto; padding: var(--sp-2) var(--sp-4); scrollbar-width: none;
  background: color-mix(in srgb, var(--paper-card) 78%, transparent); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line); }
.nr-chipbar::-webkit-scrollbar { display: none; }
.nr-chipbar button { flex: none; font: inherit; font-size: 14px; font-weight: 500; min-height: 36px; padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper-card); color: var(--fg1); cursor: pointer; position: relative; }
.nr-chipbar button::after { content: ""; position: absolute; inset: -4px 0; }
.nr-chipbar button[aria-pressed="true"] { background: var(--rada-surface); border-color: var(--accent-rada); color: var(--accent-rada); }
.nr-chipbar .n { font-family: var(--font-mono); font-size: 12px; color: var(--fg2); margin-left: 4px; }
.nr-chipbar button[aria-pressed="true"] .n { color: var(--accent-rada); }
.nr-chipbar .more { border-style: dashed; }

/* ---------- StageTrack: маршрут — компактний (рядок) і повний (вертикальний) */
.nr-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; list-style: none; margin: 0; padding: 0; }
.nr-track li { height: 4px; border-radius: 2px; background: var(--line); }
.nr-track li[data-state="done"][data-phase="registered"] { background: var(--phase-registered); }
.nr-track li[data-state="done"][data-phase="committee"], .nr-track li[data-state="current"][data-phase="committee"] { background: var(--phase-committee); }
.nr-track li[data-state="done"][data-phase="plenary"], .nr-track li[data-state="current"][data-phase="plenary"] { background: var(--phase-plenary); }
.nr-track li[data-state="done"][data-phase="signing"], .nr-track li[data-state="current"][data-phase="signing"] { background: var(--phase-signing); }
.nr-track li[data-state="done"][data-phase="in-force"], .nr-track li[data-state="current"][data-phase="in-force"] { background: var(--phase-in-force); }
.nr-track li[data-state="current"] { height: 6px; margin-top: -1px; }
.nr-track.is-off li[data-state="current"] { background: var(--phase-off); }
.nr-track-label { display: flex; justify-content: space-between; gap: var(--sp-2); margin-top: 6px; font-size: 13px; }
.nr-track-label b { font-weight: 600; }

.nr-route { list-style: none; margin: 0; padding: 0; }
.nr-route li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: var(--sp-3); position: relative; padding-bottom: var(--sp-4); }
.nr-route li::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.nr-route li:last-child::before { display: none; }
.nr-route .dot { width: 12px; height: 12px; border-radius: 50%; margin: 4px 0 0 5px; background: var(--phase-registered); position: relative; z-index: 1; }
.nr-route li[data-state="todo"] .dot { background: var(--paper-card); border: 2px solid var(--line-strong); }
.nr-route li[data-state="current"] .dot { width: 18px; height: 18px; margin: 1px 0 0 2px; box-shadow: 0 0 0 4px var(--rada-surface); }
.nr-route .t { font-size: 15px; font-weight: 600; line-height: 1.35; }
.nr-route li[data-state="todo"] .t { color: var(--fg2); font-weight: 500; }
.nr-route .s { font-size: 13px; color: var(--fg2); margin-top: 2px; }
.nr-route .d { font-family: var(--font-mono); font-size: 12px; color: var(--fg2); padding-top: 3px; font-variant-numeric: tabular-nums; }

/* ---------- BillRow: рядок законопроєкту у списку */
.nr-billrow { display: grid; gap: 6px; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--paper); color: inherit; text-decoration: none; }
.nr-billrow:active { background: var(--paper-sunk); }
.nr-billrow .top { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.nr-billrow .kind { font-size: 12px; color: var(--fg2); }
.nr-billrow .when { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--fg2); font-variant-numeric: tabular-nums; }
.nr-billrow h3 { margin: 0; font-size: 16px; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nr-billrow .upd { font-size: 14px; line-height: 1.45; color: var(--fg2); }
.nr-billrow .upd b { color: var(--fg1); font-weight: 600; }
.nr-billrow .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.nr-billrow.is-followed .kind::after { content: " · ви стежите"; color: var(--accent-rada); }

/* ---------- AmendmentClock: годинник поправок */
.nr-clock { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); background: var(--rada-surface); color: var(--fg1); }
.nr-clock .num { grid-row: span 2; font-family: var(--font-serif); font-size: 34px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--clock-ok); min-width: 1.4em; }
.nr-clock .what { font-size: 14px; font-weight: 600; line-height: 1.3; }
.nr-clock .bar { height: 6px; border-radius: 3px; background: var(--paper-card); overflow: hidden; }
.nr-clock .bar i { display: block; height: 100%; border-radius: 3px; background: var(--clock-ok); }
.nr-clock .note { grid-column: 1 / -1; font-size: 12px; color: var(--fg2); margin-top: 4px; }
.nr-clock[data-state="soon"] .num { color: var(--clock-soon); } .nr-clock[data-state="soon"] .bar i { background: var(--clock-soon); }
.nr-clock[data-state="due"] .num { color: var(--clock-due); } .nr-clock[data-state="due"] .bar i { background: var(--clock-due); }

/* ---------- UpdateItem: оновлення картки */
.nr-updates { list-style: none; margin: 0; padding: 0; }
.nr-update { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.nr-update .d { font-family: var(--font-mono); font-size: 12px; color: var(--fg2); padding-top: 2px; font-variant-numeric: tabular-nums; }
.nr-update .type { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-rada); }
.nr-update .type[data-type="plenary"] { color: var(--phase-plenary); } .nr-update .type[data-type="committee"] { color: var(--phase-committee); }
.nr-update .type[data-type="clock"] { color: var(--res-pending); } .nr-update .type[data-type="blocking"] { color: var(--res-rejected); }
.nr-update .t { font-size: 15px; line-height: 1.45; margin-top: 2px; }
.nr-update .src { font-size: 12px; color: var(--fg2); margin-top: 2px; }

/* ---------- DocumentRow: файл картки */
.nr-doc { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); background: var(--paper); }
.nr-doc .ext { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--paper-sunk); display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--fg1); }
.nr-doc .n { font-size: 15px; font-weight: 600; line-height: 1.3; }
.nr-doc .m { font-size: 12px; color: var(--fg2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.nr-doc .hit { grid-column: 2 / -1; font-size: 13px; line-height: 1.45; color: var(--fg2); }
.nr-doc .hit mark { background: var(--rada-surface); color: var(--fg1); border-radius: 3px; padding: 0 2px; }
.nr-doc .open { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-rada); }
.nr-doc.is-missing .ext { background: transparent; border: 1px dashed var(--line-strong); color: var(--fg2); }

/* ---------- FeedEvent: подія стрічки з обов'язковими файлами */
.nr-event { background: var(--paper-card); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--sp-4); display: grid; gap: var(--sp-2); }
.nr-event .kind { display: flex; align-items: center; gap: 6px; }
.nr-event .kind i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-rada); }
.nr-event h3 { margin: 0; font-family: var(--font-serif); font-size: 19px; line-height: 1.28; font-weight: 700; text-wrap: balance; }
.nr-event p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg2); }
.nr-event .files { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nr-event .files a { flex: none; display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 6px 10px; border-radius: var(--r-md); background: var(--paper-sunk); color: var(--fg1); font-size: 13px; }
.nr-event .files a b { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--fg2); }
.nr-event .src { font-size: 12px; color: var(--fg2); }

/* ---------- PlenaryAgenda: пленарний день на телефоні */
.nr-dayhead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
.nr-dayhead h2 { margin: 0; font-family: var(--font-serif); font-size: 19px; line-height: 1.28; font-weight: 700; }
.nr-dayhead .asof { font-size: 12px; color: var(--fg2); }
.nr-dayhead.is-planned { background: var(--rada-surface); border-radius: var(--r-lg); }
.nr-agenda { list-style: none; margin: 0; padding: 0; }
.nr-agenda > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.nr-agenda .no { font-family: var(--font-mono); font-size: 12px; color: var(--fg2); }
.nr-agenda .res { grid-column: 2; grid-row: 1; justify-self: end; }
.nr-agenda .title { grid-column: 1 / -1; font-size: 15px; line-height: 1.4; font-weight: 500; }
.nr-agenda .plan { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; color: var(--fg2); }
.nr-agenda .tags { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.nr-agenda details { grid-column: 1 / -1; font-size: 13px; color: var(--fg2); }
.nr-agenda summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--accent-rada); font-weight: 500; }

/* ---------- WeekMap: тижні скликання */
.nr-weekmap { display: grid; gap: 6px; }
.nr-weekmap .row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--sp-2); align-items: center; }
.nr-weekmap .yr { font-family: var(--font-mono); font-size: 12px; color: var(--fg2); }
.nr-weekmap .cells { display: flex; flex-wrap: wrap; gap: 3px; }
.nr-weekmap .cells i { width: 9px; height: 9px; border-radius: 2px; background: var(--week-other); }
.nr-weekmap .cells i.p { background: var(--week-plenary); } .nr-weekmap .cells i.c { background: var(--week-committee); }
.nr-weekmap .cells i.now { outline: 2px solid var(--fg1); outline-offset: 1px; }
.nr-weekmap .legend { display: flex; gap: var(--sp-3); flex-wrap: wrap; font-size: 12px; color: var(--fg2); }
.nr-weekmap .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.nr-weekbanner { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--rada-surface); }
.nr-weekbanner b { display: block; font-family: var(--font-serif); font-size: 19px; line-height: 1.28; }
.nr-weekbanner span { font-size: 13px; color: var(--fg2); }

/* ---------- BottomNav: скляне нижнє меню */
.nr-bnav { display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bnav-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--paper-card) 88%, transparent); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--shadow-float); border-top: 1px solid var(--line); }
.nr-bnav a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: var(--tap); color: var(--fg2); font-size: 11px; font-weight: 500; text-decoration: none; position: relative; }
.nr-bnav a[aria-current="page"] { color: var(--accent-rada); font-weight: 600; }
.nr-bnav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nr-bnav .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: var(--accent-rada); color: var(--on-accent-rada); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .nr-clock .bar i, .nr-track li { transition: width 200ms ease-out, background-color 200ms ease-out; }
}
