/* ---------- темы ---------- */
:root, [data-theme="light"] {
  --bg: #f6f4ef; --ink: #1d1c1a; --panel: #ffffff; --line: #e4e0d6; --line2: #efece4; --track: #ebe7dd;
  --chip: #f1eee6; --muted: #6d6a63; --muted2: #5c5953; --body: #3d3b37; --icon: #8a867d;
  --accent: #c2410c; --accent-bg: #c2410c; --on-accent: #ffffff; --accent-soft: #fbe9df; --accent-ink: #9a3412;
  --warn: #a14000; --ok: #15803d; --err: #b91c1c; --star: #ca8a04; --inv-muted: #c9c5bb;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --head: #ffffff; --soft: #fff7ed; --soft-line: #fdba74; --ink2: #4a463f; --muted3: #5c574f; --well: #faf8f3; --line3: #d6d0c2;
  --lead-line: #e7d3c0; --amber-bg: #fef3c7; --amber: #f59e0b; --amber-ink: #78350f; --amber-sep: #fcd34d; --rumor-ink: #92400e;
  --blue-bg: #dbeafe; --blue-ink: #1e3a8a; --green-bg: #dcfce7; --green-ink: #166534; --night: #1d1c1a; --night-ink: #f6f4ef;
  --night-muted: #d6d0c2; --night-accent: #fdba74; --night-green: #86efac; --backdrop: rgba(29,28,26,.45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412; --ink: #ecebe6; --panel: #1e1e1b; --line: #33322d; --line2: #2a2925; --track: #272622;
    --chip: #2c2b27; --muted: #a3a097; --muted2: #b5b2a9; --body: #d3d1ca; --icon: #9b988f;
    --accent: #fb923c; --accent-bg: #c2410c; --on-accent: #ffffff; --accent-soft: #3b2517; --accent-ink: #fdba74;
    --warn: #fbbf24; --ok: #4ade80; --err: #f87171; --star: #facc15; --inv-muted: #55524c;
    --head: #1e1e1b; --soft: #3b2517; --soft-line: #9a3412; --ink2: #c9c5bb; --muted3: #b5b2a9; --well: #252521; --line3: #46443e;
    --lead-line: #5a3a26; --amber-bg: #3a2c0c; --amber: #d97706; --amber-ink: #fcd34d; --amber-sep: #6b4e12; --rumor-ink: #fcd34d;
    --blue-bg: #1e2a4a; --blue-ink: #bfdbfe; --green-bg: #14361f; --green-ink: #86efac; --night: #0d0d0c; --night-ink: #f6f4ef;
    --night-muted: #c9c5bb; --night-accent: #fdba74; --night-green: #86efac; --backdrop: rgba(0,0,0,.6);
    --shadow: none; color-scheme: dark;
  }
}
[data-theme="dark"] {
  --bg: #141412; --ink: #ecebe6; --panel: #1e1e1b; --line: #33322d; --line2: #2a2925; --track: #272622;
  --chip: #2c2b27; --muted: #a3a097; --muted2: #b5b2a9; --body: #d3d1ca; --icon: #9b988f;
  --accent: #fb923c; --accent-bg: #c2410c; --on-accent: #ffffff; --accent-soft: #3b2517; --accent-ink: #fdba74;
  --warn: #fbbf24; --ok: #4ade80; --err: #f87171; --star: #facc15; --inv-muted: #55524c;
  --head: #1e1e1b; --soft: #3b2517; --soft-line: #9a3412; --ink2: #c9c5bb; --muted3: #b5b2a9; --well: #252521; --line3: #46443e;
  --lead-line: #5a3a26; --amber-bg: #3a2c0c; --amber: #d97706; --amber-ink: #fcd34d; --amber-sep: #6b4e12; --rumor-ink: #fcd34d;
  --blue-bg: #1e2a4a; --blue-ink: #bfdbfe; --green-bg: #14361f; --green-ink: #86efac; --night: #0d0d0c; --night-ink: #f6f4ef;
  --night-muted: #c9c5bb; --night-accent: #fdba74; --night-green: #86efac; --backdrop: rgba(0,0,0,.6);
  --shadow: none; color-scheme: dark;
}
:root {
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }

/* ---------- каркас и шапка (п. 2) ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--head); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(29,28,26,.05); }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 12px 32px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.top-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-width: 0; flex: 1; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 700; white-space: nowrap; padding-right: 20px; border-right: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid transparent;
  background: transparent; color: var(--ink2); font-size: 15px; font-weight: 500; white-space: nowrap; }
.tab:hover { background: var(--chip); color: var(--ink); }
.tab.active { background: var(--soft); border-color: var(--accent-bg); color: var(--accent-ink); font-weight: 600; }
.tab.add { min-width: 44px; justify-content: center; padding: 0; border: 1.5px dashed var(--line3); font-size: 18px; color: var(--ink2); }
.top-actions { display: flex; gap: 6px; padding-left: 20px; border-left: 1px solid var(--line); }
.icon-btn { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { border-color: var(--ink2); }
.icon-btn.active { background: var(--soft); border-color: var(--accent-bg); color: var(--accent-ink); }
main { max-width: 1320px; margin: 0 auto; padding: 0 32px 72px; }
main.plain { padding-top: 24px; }

.page-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; padding: 8px 0 18px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; margin: 2px 0 0; line-height: 1.15; font-weight: 700; }
.page-head .kicker { font-size: 14px; color: var(--muted3); font-weight: 500; }
.page-head .sub { color: var(--ink2); font-size: 14px; margin-top: 4px; }

/* строка под шапкой: Дайджест / Сюжеты и Вся лента / Источники / Профиль */
.ind-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding: 18px 0; }
.seg { display: flex; gap: 4px; background: var(--track); border-radius: 12px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; border-radius: 9px; min-height: 44px; padding: 0 20px; background: transparent; color: var(--ink2); font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.seg.modes button { padding: 0 26px; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(29,28,26,.08); }

/* ---------- чипы-фильтры (п. 2) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fchip { min-height: 46px; padding: 0 20px; border-radius: 12px; border: 2px solid var(--accent-bg); background: var(--soft); color: var(--accent-ink); font-size: 15px; font-weight: 600; }
.fchip:hover { filter: brightness(.98); }
.fchip.on { background: var(--accent-bg); color: var(--on-accent); }
.rest-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 44px 0 18px; }
.rest-head h2, .block-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 24px; }

/* ---------- плитки (п. 1, 4) ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento > * { grid-column: auto !important; grid-row: auto !important; } }
.tile { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px;
  min-width: 0; overflow-wrap: anywhere; transition: box-shadow .15s, transform .15s, opacity .25s; }
.tile:hover { box-shadow: 0 6px 20px rgba(29,28,26,.08); transform: translateY(-1px); }
.tile.gone { opacity: 0; transform: scale(.98); }
.tile.read { opacity: .55; }
.tile.read:hover { opacity: .85; }
.tilebtn { all: unset; cursor: pointer; }
.tilebtn::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.tilebtn:focus-visible::after { outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.tile a, .tile .act { position: relative; z-index: 1; }
.tile h3 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.22; }
.tile p { margin: 0; }
.t-kick { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; font-size: 13px; }
.kick { font-weight: 600; color: var(--accent-ink); letter-spacing: .04em; text-transform: uppercase; }
.t-read { color: var(--ink2); font-weight: 600; }
.t-short { font-size: 14px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t-why { font-size: 15px; }
.t-foot { margin-top: auto; font-size: 13px; color: var(--ink2); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.t-more { font-weight: 600; color: var(--accent-ink); }
.ttags { display: flex; flex-wrap: wrap; gap: 6px; }
.ttag { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--chip); color: var(--ink2); }
.ttag.boost { background: var(--soft); color: var(--accent-ink); font-weight: 600; }
/* пометки */
.mark { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 6px; margin-left: 4px; letter-spacing: 0; text-transform: none; font-weight: 500; vertical-align: 1px; }
.mark.rumor { color: var(--rumor-ink); background: var(--amber-bg); }
.mark.explore { color: var(--blue-ink); background: var(--blue-bg); }
.mark.diff { color: var(--amber-ink); background: var(--amber-bg); border: 1px solid var(--amber); padding: 0 7px; font-weight: 600; }
.mark.boost { color: var(--accent-ink); background: var(--soft); font-weight: 600; }
.ttag.diff { color: var(--amber-ink); background: var(--amber-bg); border: 1px solid var(--amber); font-weight: 600; padding: 2px 10px; }

/* уровни веса */
.t-top { grid-column: span 2; grid-row: span 2; padding: 34px 36px 24px; gap: 16px; border-color: var(--lead-line);
  box-shadow: inset 0 6px 0 var(--accent-bg), 0 10px 30px rgba(194,65,12,.10); }
.t-top:hover { box-shadow: inset 0 6px 0 var(--accent-bg), 0 14px 34px rgba(194,65,12,.16); }
.t-top h3 { font-size: clamp(32px, 3.2vw, 48px); line-height: 1.08; letter-spacing: -.015em; }
.t-top .t-why { font-size: 18px; line-height: 1.5; }
.t-top .t-short { font-size: 15px; -webkit-line-clamp: 4; }
.t-top .t-foot { padding-top: 12px; border-top: 1px solid var(--line2); font-size: 14px; }
.t-mid { grid-column: span 2; padding: 24px 26px; gap: 10px; box-shadow: inset 0 3px 0 var(--soft-line); }
.t-mid:hover { box-shadow: inset 0 3px 0 var(--soft-line), 0 6px 20px rgba(29,28,26,.08); }
.t-mid h3 { font-size: 28px; line-height: 1.18; }
.t-norm { padding: 22px 24px; }
.t-norm h3 { font-size: 20px; }
.t-quiet { background: transparent; padding: 14px 18px; }
.t-quiet h3 { font-size: 15px; font-weight: 500; color: var(--ink2); line-height: 1.3; }
.t-quiet .kick { color: var(--muted3); }

/* VIP и сюжет №1 внутри сетки */
.t-vip { background: var(--soft); border-color: #fed7aa; }
[data-theme="dark"] .t-vip { border-color: var(--soft-line); }
.t-vip .kick { letter-spacing: .08em; font-size: 12px; }
.t-vip blockquote { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.t-vip blockquote a { text-decoration: none; }
.t-vip blockquote a:hover { color: var(--accent); }
.t-vip .act { margin-top: auto; align-self: flex-start; border: 0; background: transparent; padding: 0; color: var(--accent-ink); font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.t-night { grid-column: span 2; background: var(--night); color: var(--night-ink); border-color: var(--night); padding: 24px 26px; gap: 10px; }
.t-night .t-kick { font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.t-night .t-kick span:first-child { color: var(--night-accent); }
.t-night .t-kick span:last-child { color: var(--night-green); }
.t-night h3 { font-size: 26px; line-height: 1.2; }
.t-night .t-short { color: var(--night-muted); }
.t-night .t-foot { color: var(--night-muted); }
.t-night .t-more { color: var(--night-accent); }
.t-ghost { background: transparent; border: 1.5px dashed var(--line3); justify-content: center; align-items: center; text-align: center; min-height: 150px; color: var(--ink2); }

/* прочитано */
.readbar { display: flex; align-items: center; gap: 10px 14px; flex: 0 1 620px; flex-wrap: wrap; justify-content: flex-end; }
.readbar .bar { flex: 1 1 100px; min-width: 100px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.readbar .bar i { display: block; height: 6px; background: var(--accent-bg); }
.readbar .lbl { font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.readbar select.input { min-height: 40px; font-size: 13px; }
.btn.lite { min-height: 40px; border-color: var(--line3); font-size: 13px; white-space: nowrap; }

/* ---------- поп-ап (п. 1, 5, 6) ---------- */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.m-back { position: absolute; inset: 0; border: 0; background: var(--backdrop); cursor: default; }
.m-card { position: relative; width: 100%; max-width: 1040px; max-height: calc(100% - 96px); overflow-y: auto; background: var(--panel); border-radius: 22px;
  box-shadow: 0 24px 64px rgba(29,28,26,.25); padding: 30px 36px 24px; overflow-wrap: anywhere; }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--ink2); }
.m-meta .kick { letter-spacing: .04em; }
.m-meta .mark { margin-left: 0; font-size: 12px; padding: 1px 8px; }
.m-close { flex: none; width: 40px; height: 40px; margin: -8px -12px 0 0; border: 0; border-radius: 10px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; }
.m-card h2 { margin: 10px 0 14px; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.18; }
.m-cols { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: flex-start; }
.m-main { flex: 999 1 420px; min-width: 0; }
.m-side { flex: 1 1 260px; min-width: 0; border-left: 1px solid var(--line2); padding-left: 24px; }
@media (max-width: 760px) { .m-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line2); padding-top: 16px; } }
.m-why { margin: 0 0 14px; font-size: 16px; padding: 12px 16px; background: var(--soft); border-radius: 12px; }
.m-text { margin: 0 0 12px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--body); }
.m-h { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted3); }
.m-src { display: flex; flex-direction: column; gap: 8px; }
.m-src a { display: block; padding: 12px 14px; border-radius: 12px; background: var(--well); border: 1px solid var(--line2); text-decoration: none; }
.m-src a:hover { border-color: var(--soft-line); }
.m-src .n { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink2); }
.m-src .n span:last-child { color: var(--accent-ink); }
.m-src .tm { display: block; font-size: 12px; color: var(--muted3); margin-top: 1px; }
.m-src .tt { display: block; font-size: 14px; line-height: 1.4; margin-top: 6px; }
.m-topic { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; font-size: 14px; width: 100%; background: transparent; text-align: left; }
.m-topic:hover { border-color: var(--soft-line); }
.m-topic .l { color: var(--ink2); }
.m-topic .arr { color: var(--accent-ink); }
.m-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line2); }
.mbtn { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.mbtn:hover { border-color: var(--ink2); }
.mbtn.fav.on { color: var(--star); border-color: var(--star); font-weight: 600; }
.mbtn.up { border: 1.5px solid var(--accent-bg); background: var(--soft); color: var(--accent-ink); font-weight: 600; }
.mbtn.up.on { background: #c2410c; color: #ffffff; }
.mbtn.down { border: 1.5px solid var(--ink); background: var(--panel); color: var(--ink); font-weight: 600; }
.mbtn.down.on { background: var(--ink); color: var(--bg); }
.m-nav { position: relative; width: 100%; max-width: 1040px; display: flex; gap: 14px; }
.m-nav button { flex: 1; min-height: 64px; border: 0; border-radius: 18px; font-size: 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 12px 32px rgba(29,28,26,.22); background: var(--panel); color: var(--ink); }
.m-nav button.next { background: #c2410c; color: #ffffff; }
.m-nav b { font-size: 26px; line-height: 1; font-weight: 400; }
@media (max-width: 600px) {
  .modal { padding: 12px; gap: 10px; }
  .m-card { padding: 22px 20px 18px; max-height: calc(100% - 78px); }
  .m-card h2 { font-size: 24px; }
  .m-nav button { min-height: 56px; font-size: 16px; }
}

/* плашка «Источники расходятся» (п. 5) */
.diffs { margin: 16px 0 0; background: var(--amber-bg); border: 2px solid var(--amber); border-radius: 12px; box-shadow: 0 4px 14px rgba(245,158,11,.18); max-width: 100%; overflow-wrap: anywhere; }
.diffs > button { display: flex; width: 100%; align-items: flex-start; gap: 8px; padding: 13px 16px; border: 0; background: transparent; text-align: left; color: var(--amber-ink); font-size: 15px; }
.diffs .ic { flex: none; width: 26px; height: 26px; margin-top: -3px; border-radius: 8px; background: var(--amber); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; }
.diffs .ttl { flex: 1; min-width: 0; }
.diffs .arrow { flex: none; font-weight: 700; }
.diffs .body { padding: 0 16px 10px; }
.diff { padding: 9px 0; border-top: 1px solid var(--amber-sep); font-size: 15px; line-height: 1.45; }
.diff .lbl { font-weight: 600; margin-bottom: 5px; }
.diff ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.diff li a { font-weight: 500; color: var(--accent-ink); text-underline-offset: 3px; }
.diff .more { border: 0; background: var(--panel); color: var(--rumor-ink); border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 600; margin-left: 4px; }
.diff .all { margin-top: 6px; border: 0; background: transparent; padding: 4px 0; color: var(--rumor-ink); font-size: 13px; font-weight: 600; text-decoration: underline; }

/* ---------- сюжеты (п. 6) ---------- */
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.new { color: var(--green-ink); background: var(--green-bg); }
.pill.tracked { color: var(--accent-ink); background: var(--soft); border: 1px solid var(--soft-line); padding: 1px 9px; }
.tp-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tile.topic { gap: 12px; }
.tile.topic h3 { line-height: 1.12; letter-spacing: -.01em; }
.tile.topic .t-sum { font-size: 15px; color: var(--body); line-height: 1.5; }
.t-top.topic .t-sum { font-size: 18px; }
.t-top.topic h3 { font-size: clamp(32px, 3.2vw, 46px); }
.t-norm.topic h3 { font-size: 21px; }
.t-quiet.topic { padding: 16px 20px; }
.t-quiet.topic h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.latest { background: var(--well); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.latest div:first-child { font-size: 12px; font-weight: 600; color: var(--ink2); }
.tile.topic .t-foot { padding-top: 10px; border-top: 1px solid var(--line2); }
.follow { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--accent-bg); background: var(--soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.follow.on { background: var(--accent-bg); color: var(--on-accent); }
.follow.big { width: 100%; margin-top: 10px; min-height: 46px; border-radius: 12px; border-width: 2px; font-size: 15px; }
.m-new { margin: 0 0 18px; font-size: 16px; padding: 12px 16px; background: var(--soft); border-radius: 12px; }
.chron { margin-bottom: 14px; }
.chron .day { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.chron .list { display: flex; flex-direction: column; border-left: 2px solid var(--soft-line); padding-left: 14px; gap: 2px; }
.chron a { display: flex; gap: 12px; padding: 7px 0; text-decoration: none; font-size: 14px; }
.chron a:hover .tt { color: var(--accent); }
.chron .tm { flex: none; width: 44px; font-size: 12px; color: var(--ink2); padding-top: 2px; }
.chron .csrc { font-weight: 600; color: var(--ink2); font-size: 12px; }
.who { margin-bottom: 12px; }
.who .r { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.who .r span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .r span:last-child { flex: none; font-weight: 600; }
.who .b { height: 6px; background: var(--chip); border-radius: 99px; margin-top: 5px; overflow: hidden; }
.who .b i { display: block; height: 6px; background: var(--accent-bg); border-radius: 99px; }
.empty-dash { border: 1.5px dashed var(--line3); border-radius: 20px; padding: 40px; text-align: center; color: var(--ink2); }

/* главная «Главное» */
.hl-ind { margin-bottom: 40px; }
.hl-ind h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 14px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.hl-ind h2 button { font-family: var(--font); font-size: 13px; }

/* боковой список VIP в поп-апе */
.vip-list .post { padding: 12px 0; border-top: 1px solid var(--line2); }
.vip-list .post:first-child { border-top: 0; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }


/* ---------- общие карточки ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title:first-child { margin-top: 0; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--chip); text-decoration: none; color: var(--body); border: 0; }
.star { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 8px; color: var(--icon); display: inline-flex; align-items: center; justify-content: center; }
.star:hover { background: var(--chip); }
.star.on { color: var(--star); }
.star.on svg { fill: currentColor; }
.side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0; padding: 14px 18px 10px; }
.post { padding: 12px 18px; border-top: 1px solid var(--line2); }
.post .meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; justify-content: space-between; }
.post a { text-decoration: none; display: block; margin-top: 2px; font-size: 14px; }
.post a:hover { color: var(--accent); }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }

/* ---------- лента ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.input, select.input, textarea.input { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; min-width: 0; min-height: 38px; }
textarea.input { width: 100%; resize: vertical; min-height: 70px; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.feed-item { padding: 12px 16px; border-bottom: 1px solid var(--line2); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item a { text-decoration: none; font-weight: 500; }
.feed-item a:hover { color: var(--accent); }
.feed-item .meta { font-size: 12px; color: var(--muted); grid-column: 1; }
.feed-item .star { position: static; grid-row: 1 / span 2; grid-column: 2; }

/* ---------- кнопки ---------- */
.btn { border: 1px solid var(--line); background: var(--panel); padding: 0 14px; min-height: 38px; border-radius: 10px; font-weight: 500; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- источники ---------- */
.src { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.src:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.error { background: var(--err); } .dot.quiet { background: var(--warn); } .dot.paused { background: var(--line); }
.src .name { font-weight: 500; }
.src .meta { font-size: 12px; color: var(--muted); grid-column: 2; }
.src .meta.err { color: var(--err); }
.src .acts { display: flex; gap: 6px; grid-row: 1 / span 2; grid-column: 3; align-items: center; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); margin-left: 6px; font-weight: 600; }
.kind { font-size: 11px; color: var(--muted); margin-left: 6px; }

.form { padding: 16px; display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form label.row { display: flex; grid-template-columns: none; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .input { flex: 1; }
.hint { font-size: 12px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.settings-grid h2 { font-size: 16px; margin: 0; padding: 16px 16px 0; }


/* вход */
.login { max-width: 360px; margin: 12vh auto; padding: 28px; }
.login h1 { font-family: var(--serif); margin: 0 0 4px; }
.login .sub { color: var(--muted); margin-bottom: 18px; }
.login form { display: grid; gap: 10px; }

.banner { padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); margin-bottom: 16px; font-size: 14px; }
.banner.err { background: color-mix(in srgb, var(--err) 14%, transparent); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 70; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); padding: 0; width: min(480px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { margin: 0; padding: 16px 16px 0; font-size: 18px; }

/* профиль */
.pref { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 5px 0; }
.pref .pname { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pref .kind { margin: 0; }
.pbar { grid-column: 1 / -1; height: 4px; background: var(--chip); border-radius: 4px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 4px; }
.pbar.pos i { background: var(--ok); }
.pbar.neg i { background: var(--err); }
.counts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; }

@media (max-width: 600px) {
  .top-inner, main { padding-left: 16px; padding-right: 16px; }
  .brand { border-right: 0; padding-right: 0; }
  .top-actions { padding-left: 0; border-left: 0; }
  .t-top { padding: 24px 22px 18px; }
  .ind-bar .seg { width: 100%; }
  .ind-bar .seg button { flex: 1 1 auto; justify-content: center; padding: 0 10px; font-size: 14px; }
  .readbar { justify-content: flex-start; }
  .page-head h1 { font-size: 26px; }
  .src { grid-template-columns: auto 1fr; } .src .acts { grid-row: auto; grid-column: 1 / -1; flex-wrap: wrap; }
}

/* режим «кабинет члена семьи» */
.acting { max-width: 1360px; margin: 12px auto 0; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-bg); border-radius: 12px; font-size: 14px; }
.acting span { flex: 1; min-width: 220px; }
@media (min-width: 1408px) { .acting { margin-left: auto; margin-right: auto; } }
@media (max-width: 1407px) { .acting { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 600px) { .acting { margin-left: 16px; margin-right: 16px; } }
.src .meta + .meta { grid-column: 2; }
