/* Скруглённые панели, кнопки-пилюли и подсветка линий обсуждения.
   Таблица тем и раскладка автор/текст адаптируются к ширине экрана. */
@font-face { font-family: "Golos Text"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #ffffff;
  --fg: #1a282d;
  --muted: #576f79;
  --faint: #647980;
  --line: #e2e7e9;
  --line-strong: #b8c5cb;
  --accent: #c53d00;
  --accent-soft: #fff0e8;
  --hover: #eef2f4;
  --control: #e9eef0;
  --useful: #2e7a4c;      /* semantic: useful author */
  --useful-soft: #e3efe6;
  --bad: #b3261e;         /* semantic: broken / lagging source */
  --warn: #8a5a00;
  --quote-bg: #f0f3f5;
  --hl: #fff0e8;
  --chrome: #e9eef0;

  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --display: "Unbounded", var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-body: 16.5px; --fs-lg: 20px; --fs-xl: 24px;
  --r: 16px;
  --r-sm: 10px;
  --pill: 999px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1113; --surface: #181c1f; --fg: #eef1f3; --muted: #a7b6bd; --faint: #8f9fa7;
  --line: #2c3438; --line-strong: #48565d; --accent: #ff956b; --accent-soft: #38251e;
  --hover: #222a2f; --control: #283238;
  --useful: #74c08f; --useful-soft: #213128; --bad: #f2857d; --warn: #e0b550; --quote-bg: #222a2f; --hl: #38251e; --chrome: #222a2f;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0e1113; --surface: #181c1f; --fg: #eef1f3; --muted: #a7b6bd; --faint: #8f9fa7;
  --line: #2c3438; --line-strong: #48565d; --accent: #ff956b; --accent-soft: #38251e;
  --hover: #222a2f; --control: #283238;
  --useful: #74c08f; --useful-soft: #213128; --bad: #f2857d; --warn: #e0b550; --quote-bg: #222a2f; --hl: #38251e; --chrome: #222a2f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: var(--fs-md)/1.5 var(--font); }
h1, .sect h2, .logo { font-family: var(--display); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn, .star, .nav a, .tabs a, .bar .links a, .pager a, .acts a, .acts button, .linklike {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sep { color: var(--faint); padding-inline: 4px; }

/* ---------- forum header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; gap: 28px; align-items: center; min-height: 72px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 23px; color: var(--fg); letter-spacing: -0.05em; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); }
.nav a { color: var(--muted); padding: 10px 16px; border-radius: var(--pill); font-weight: 600; }
.nav a.on { color: var(--fg); background: var(--control); }
.nav a:hover { text-decoration: none; color: var(--fg); background: var(--hover); }
.search { margin-left: auto; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 56px; }

/* ---------- list page ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 9px 16px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); }
.tabs a.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--fg); background: var(--hover); border-color: var(--line-strong); }
.tabs .cnt { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); margin-left: 3px; }
.tabs .gap { width: 1px; background: var(--line); margin: 6px 4px; }

.bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: var(--fs-sm); color: var(--muted); margin: 10px 0 18px; }
.bar .links { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bar .links a { color: var(--muted); padding: 7px 12px; border-radius: var(--pill); }
.bar .links a.on { color: var(--fg); font-weight: 600; background: var(--control); }
.bar .links a:hover { text-decoration: none; color: var(--fg); background: var(--hover); }
.bar .sort { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.bar .right { margin-left: auto; }

.sect { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 10px; }
.sect h2 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.sect .muted { font-size: var(--fs-sm); }

.tbl { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 28px; }
.row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 88px 160px; column-gap: 16px; padding: 16px; border-top: 1px solid var(--line); align-items: start; transition: background-color 140ms ease, box-shadow 140ms ease; }
.row:first-child { border-top: 0; border-radius: var(--r) var(--r) 0 0; }
.row:last-child { border-radius: 0 0 var(--r) var(--r); }
.row:only-child { border-radius: var(--r); }
.row:not(.head):is(:hover, :focus-within) { background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.row.head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding-block: 12px; background: var(--bg); border-radius: var(--r) var(--r) 0 0; }
.star { border: 0; background: var(--control); padding: 0; cursor: pointer; font-size: 21px; line-height: 36px; color: var(--muted); width: 36px; height: 36px; border-radius: var(--pill); }
.star:hover { color: var(--accent); background: var(--accent-soft); }
.star[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.t-main { min-width: 0; }
.t-title { font-size: 16px; font-weight: 600; color: var(--fg); line-height: 1.5; }
.t-title:visited { color: var(--fg); }
.src { display: inline-block; font-size: 11px; line-height: 18px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); color: var(--muted); vertical-align: 1px; margin-right: 6px; max-width: 100%; overflow-wrap: anywhere; }
.src b { font-weight: 600; margin-right: 4px; }
.t-ex { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }
.t-meta .useful-mark { color: var(--useful); font-weight: 600; }
.t-meta .acts-inline { margin-left: 4px; }
.t-rep { text-align: right; font-size: var(--fs-sm); }
.t-rep .n { color: var(--fg); font: 500 15px/22px var(--display); }
.new { display: inline-block; color: var(--accent); font-weight: 700; }
.mine .new { font-size: var(--fs-md); }
.t-last { font-size: var(--fs-sm); line-height: 1.35; overflow-wrap: anywhere; }
.t-last .who { color: var(--fg); }
.t-last .when { color: var(--muted); font-size: var(--fs-xs); }
.row.read .t-title, .row.read .t-rep .n, .row.read .t-last .who { color: var(--muted); font-weight: 500; }
.row.read .t-title { font-weight: 500; }
.ico { font-size: var(--fs-xs); color: var(--muted); margin-left: 4px; white-space: nowrap; }
.pager { display: flex; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); align-items: center; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); }
.pager a:hover { background: var(--hover); border-color: var(--line-strong); text-decoration: none; }
.pager span.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.pager span.dots { border: 0; background: none; min-width: 0; }

/* ---------- thread page ---------- */
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 28px; line-height: 1.25; margin: 0 0 14px; text-wrap: balance; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.th-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 22px; }
.btn { display: inline-flex; justify-content: center; gap: 6px; align-items: center; min-height: 36px; border: 1px solid var(--line); background: var(--control); border-radius: var(--pill); padding: 8px 16px; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; color: var(--fg); }
.btn:hover { border-color: var(--line-strong); background: var(--hover); text-decoration: none; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn.star-btn[aria-pressed="true"]::before { content: "★"; }
.btn.star-btn[aria-pressed="false"]::before { content: "☆"; }

.post { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); scroll-margin-top: 20px; transition: border-color 140ms ease; }
.post + .post, .post.c { margin-top: 12px; }
.post:is(:hover, :focus-within) { border-color: var(--line-strong); }
.author { padding: 20px 16px; border-right: 1px solid var(--line); border-radius: var(--r) 0 0 var(--r); font-size: var(--fs-sm); background: var(--bg); min-width: 0; }
.ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--fg); background: var(--control); margin-bottom: 10px; }
.ava.ch { background: var(--accent-soft); color: var(--accent); }
.ava { overflow: hidden; flex-shrink: 0; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava-lg { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 10px; }
.a-name { font-weight: 600; color: var(--fg); word-break: break-word; }
.a-sub { font-size: var(--fs-xs); color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; line-height: 16px; padding: 2px 8px; border: 1px solid transparent; border-radius: var(--pill); margin-top: 4px; }
.badge.useful { background: var(--useful-soft); color: var(--useful); }
.badge.useless { background: var(--quote-bg); color: var(--faint); }
.body { padding: 20px 24px; min-width: 0; border-radius: 0 var(--r) var(--r) 0; }
.b-head { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 6px; }
.b-head .num-id { margin-left: auto; color: var(--faint); }
.text { font-size: var(--fs-body); line-height: 1.65; max-width: 70ch; overflow-wrap: anywhere; }
.text p { margin: 0 0 .7em; }
.text p:last-child { margin-bottom: 0; }

.post.op .text { font-size: 19px; line-height: 1.7; }
.text a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text ul, .text ol { margin: 0 0 1em; padding-left: 1.4em; }
.text li + li { margin-top: .3em; }
.post.op .author { background: var(--surface); }

.media { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; max-width: 560px; }
.media figure { margin: 0; flex: 1 1 200px; position: relative; }
.media img, .media .ph { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--quote-bg); max-width: 100%; }
.media .dur { position: absolute; left: 8px; top: 8px; font-size: 11px; background: rgba(0,0,0,.7); color: #fff; padding: 3px 8px; border-radius: var(--pill); }
.media .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff; text-shadow: none; pointer-events: none; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: var(--bg); font-size: var(--fs-sm); max-width: 420px; margin-top: 10px; overflow-wrap: anywhere; }
.file .ext { font: 600 11px var(--mono); color: var(--accent); border: 1px solid var(--accent); border-radius: var(--pill); padding: 3px 7px; }
.file .sz { color: var(--muted); font-size: var(--fs-xs); }
.wave { display: flex; align-items: center; gap: 2px; height: 22px; flex: 1; }
.wave i { display: block; width: 3px; background: var(--muted); border-radius: 1px; }

.reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.re { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); padding: 5px 12px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); }
.re .num { color: var(--muted); font-size: var(--fs-xs); }

.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-xs); margin-top: 14px; }
.acts a, .acts button { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); background: var(--control); border: 0; border-radius: var(--pill); padding: 6px 12px; cursor: pointer; font: 600 var(--fs-xs)/1.4 var(--font); }
.acts a:hover, .acts button:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.quote { display: block; background: var(--quote-bg); border-left: 3px solid var(--line-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 14px; margin: 0 0 12px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; max-width: 70ch; position: relative; transition: border-color 140ms ease, background-color 140ms ease; }
.quote b { color: var(--fg); font-weight: 600; }
.quote:is(:hover, :focus-visible) { border-left-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.quote .full { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 12px 16px; color: var(--fg); font-size: var(--fs-sm); line-height: 1.5; }
@media (hover: hover) { .quote:hover .full { display: block; } }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.toolbar .count { font-weight: 700; margin-right: 6px; }
.toolbar .count .new { font-weight: 700; }
.toolbar .spacer { flex: 1; }

.best { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 16px; }
.best h3 { margin: 0; font-size: var(--fs-sm); color: var(--muted); padding: 7px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.best ol { list-style: none; margin: 0; padding: 0; }
.best li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.best li:first-child { border-top: 0; }
.best .score { color: var(--accent); font-weight: 700; }
.best .ex { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.best .ex b { color: var(--fg); font-weight: 600; }

.comments { position: relative; padding-left: 24px; }
.comments::before { content: ""; position: absolute; top: 0; bottom: 0; left: 6px; width: 2px; border-radius: var(--pill); background: var(--line-strong); }
.comments .post.c::before { content: ""; position: absolute; top: -1px; bottom: -1px; left: -19px; width: 2px; border-radius: var(--pill); background: transparent; transition: background-color 140ms ease; }
.comments .post.c:is(:hover, :focus-within)::before { background: var(--accent); }
.comments .post.c:first-child { margin-top: 0; }
.post:target { border-color: var(--accent); }
.post:target .body { background: var(--hl); }
.comments .post.c:target::before { background: var(--accent); }
.comments:not(:has(.post.c, .folded-d)) { padding-left: 0; }
.comments:not(:has(.post.c, .folded-d))::before { display: none; }
.c.useful { box-shadow: inset 3px 0 0 var(--useful); }
.c.useful .author { background: var(--useful-soft); box-shadow: inset 3px 0 0 var(--useful); }
.c.useless .text, .c.useless .a-name { color: var(--muted); }
.c.useless .ava { background: var(--control); color: var(--muted); }
.c.flash .body { background: var(--hl); }
.c.deleted .text { color: var(--muted); }
.c.deleted .del-note { font-size: var(--fs-xs); color: var(--muted); border: 1px dashed var(--line-strong); padding: 2px 6px; border-radius: 2px; display: inline-block; margin-bottom: 6px; }
.c.deleted .text p { text-decoration: line-through; text-decoration-color: var(--faint); }

.folded { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: var(--fs-sm); color: var(--muted); }
.folded:is(:hover, :focus-visible) { border-color: var(--accent); background: var(--hover); }
.folded-d { margin-top: 12px; }
.folded-d:first-child { margin-top: 0; }
.folded .ex { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folded button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: var(--fs-sm); white-space: nowrap; }

.divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--accent); font-size: var(--fs-sm); font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--accent); }
.divider + .post.c, .post.c.before-div { border-radius: var(--r); }

.comments.tree .post.c[data-depth="1"] .quote { display: none; }
.comments.essential .post.c:not([data-essential]), .comments.essential .folded { display: none; }
.comments.essential .divider { display: none; }

.bottom { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; font-size: var(--fs-sm); color: var(--muted); }

.legend { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 14px; font-size: var(--fs-sm); color: var(--muted); max-width: 70ch; }
.legend h4 { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--fg); }
.legend ul { margin: 0; padding-left: 18px; }

/* ---------- narrow: phone ---------- */
@media (max-width: 680px) {
  .top-in { gap: 12px 16px; padding: 14px 16px; }
  .search { display: none; }
  .nav { gap: 4px; flex-wrap: wrap; flex-basis: 100%; max-width: 100%; }
  .nav a { padding: 9px 12px; white-space: nowrap; flex-shrink: 0; }
  .page { padding: 20px 12px 40px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px; margin-bottom: 20px; }
  .tabs a { white-space: nowrap; flex-shrink: 0; }
  .tabs .gap { flex-shrink: 0; }
  .bar .right { margin-left: 0; }
  .row { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "s m m" ". l r"; gap: 8px 10px; padding: 14px 12px; }
  .row.head { display: none; }
  .row > .star, .row > form.inl { grid-area: s; }
  .row > .t-main { grid-area: m; }
  .row > .t-rep { grid-area: r; text-align: right; }
  .row > .t-last { grid-area: l; display: flex; gap: 6px; align-items: baseline; min-width: 0; }
  .t-rep .lbl { display: inline; }
  .t-ex { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  h1 { font-size: var(--fs-lg); }
  .t-rep .n { font-size: 14px; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .author { border-right: 0; border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 12px; }
  .author .ava { width: 30px; height: 30px; font-size: 12px; margin: 0; }
  .author .badge { margin-top: 0; }
  .author .a-stat { display: none; }
  .body { padding: 14px 12px; border-radius: 0 0 var(--r) var(--r); }
  .text { font-size: 16px; }
  .post.op .text { font-size: 16.5px; }
  .best li { grid-template-columns: 54px minmax(0, 1fr); }
  .toolbar .spacer { display: none; }
  .media figure { flex-basis: 96px; }
  .comments { padding-left: 16px; }
  .comments::before { left: 3px; }
  .comments .post.c::before { left: -14px; }
}
@media (min-width: 681px) { .t-rep .lbl { display: none; } }

.text code { font-family: var(--mono); font-size: .92em; background: var(--quote-bg); padding: 1px 4px; border-radius: 2px; }
.text pre { font-family: var(--mono); background: var(--quote-bg); padding: 8px 10px; overflow-x: auto; border-radius: var(--r); }
.text blockquote { margin: 0 0 .7em; padding: 6px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); transition: border-color 140ms ease; }
.text blockquote:hover { border-left-color: var(--accent); }
.text img { max-width: 100%; height: auto; }
.del-note { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 6px; }

/* ---------- sources page ---------- */
.add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 20px; }
.add input, .add select { font: inherit; font-size: var(--fs-sm); min-height: 40px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); color: var(--fg); max-width: 100%; }
.add input { flex: 1 1 260px; min-width: 0; }
.form-error { color: var(--bad); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.state-error { color: var(--bad); font-weight: 600; }
.state-active { color: var(--useful); }
.src-row, .row.src-row { grid-template-columns: minmax(0, 1fr) 200px 140px 110px; align-items: center; overflow-wrap: anywhere; }
@media (max-width: 680px) { .row.src-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; row-gap: 6px; } }

.media video { display: block; width: 100%; max-height: 420px; background: #000; border-radius: var(--r-sm); }
.media .dl, .file .dl { margin: 6px 0 0; font-size: var(--fs-xs); }
.file audio { height: 32px; max-width: 100%; width: 260px; }

/* ---------- login ---------- */
.login { max-width: 380px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.login input[type="password"] { font: inherit; min-width: 0; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--bg); color: var(--fg); }
.login .btn { justify-content: center; margin-top: 6px; }
.login .btn, .add > .btn { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.login .btn:hover, .add > .btn:hover { background: var(--accent-soft); color: var(--accent); }
.logout { margin-left: auto; }
.logout .linklike { font-size: var(--fs-sm); color: var(--muted); }

/* ---------- личное состояние ---------- */
form.inl { display: inline; margin: 0; }
.linklike { border: 0; background: none; padding: 6px 10px; border-radius: var(--pill); cursor: pointer; font: inherit; color: var(--muted); }
.linklike:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.acts button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.row form.inl .star { display: block; }
.acts-inline { margin-left: auto; }
.th-meta .btn.star-btn { margin-left: 4px; }
details.folded-d > summary { list-style: none; cursor: pointer; }
details.folded-d > summary::-webkit-details-marker { display: none; }
details.folded-d[open] > summary { display: none; }
.folded .open-lbl { color: var(--accent); white-space: nowrap; }
.note { display: grid; gap: 6px; max-width: 70ch; margin: 12px 0; font-size: var(--fs-sm); color: var(--muted); }
.note textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); resize: vertical; min-width: 0; }
.note .btn { justify-self: start; }
.b-head a { color: var(--muted); }
.a-name a { color: inherit; }
.a-name a:hover { color: var(--accent); }

/* Статус источников и журнал */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); vertical-align: middle; }
.dot.bad { background: var(--bad); }
.badge { display: inline-block; font-size: var(--fs-xs); padding: 2px 8px; border-radius: var(--pill); border: 1px solid var(--line-strong); color: var(--muted); }
.badge.off { border-color: var(--line-strong); color: var(--muted); }
.badge.ok { color: var(--useful); border-color: var(--useful); background: var(--useful-soft); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.bad { color: var(--bad); border-color: var(--bad); font-weight: 600; }
.status-row, .row.status-row { grid-template-columns: minmax(0, 1.4fr) 150px minmax(0, 1fr) minmax(0, 1fr); align-items: start; overflow-wrap: anywhere; }
.event-row, .row.event-row { grid-template-columns: 130px 140px minmax(0, 1fr); align-items: start; overflow-wrap: anywhere; }
.src-row > :not(.t-main), .status-row > :not(.t-main), .event-row { font-size: var(--fs-sm); }
h1 + .tbl { margin-top: 14px; }
.row > .t-main:only-child { grid-column: 1 / -1; }
.event-row .lvl-error { color: var(--bad); }
.event-row .lvl-warn { color: var(--warn); }
@media (max-width: 680px) {
  .row.status-row, .row.event-row { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
}

/* ---------- метки типов источников ---------- */
:root { --src-tg: #2a76ae; --src-ss: #b8531a; --src-rss: #3a7a4d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --src-tg: #74b4e6; --src-ss: #f09a62; --src-rss: #86c597; } }
:root[data-theme="dark"] { --src-tg: #74b4e6; --src-ss: #f09a62; --src-rss: #86c597; }
.src-telegram { color: var(--src-tg); border-color: var(--src-tg); }
.src-substack { color: var(--src-ss); border-color: var(--src-ss); }
.src-rss { color: var(--src-rss); border-color: var(--src-rss); }
.src-telegram b, .src-substack b, .src-rss b { color: inherit; }

/* Поиск */
.search input { width: 180px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); color: var(--fg); font: inherit; font-size: var(--fs-sm); }
.sfilters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; margin-bottom: 20px; font-size: var(--fs-sm); color: var(--muted); }
.sfilters label { display: flex; flex-direction: column; gap: 2px; }
.sfilters label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 6px; }
.sfilters input[type="search"], .sfilters select, .sfilters input[type="date"] { min-height: 40px; min-width: 0; max-width: 100%; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); color: var(--fg); font: inherit; }
.sfilters label { min-width: 0; max-width: 100%; }
.sfilters input[type="search"] { flex: 1 1 260px; }
.hit .text mark { background: var(--hl); color: inherit; border-radius: 2px; padding: 0 1px; }

/* Дайджест */
.digest-item { border-top: 1px solid var(--line); padding: 14px 0; }
.digest-item .t-title { font-weight: 600; color: var(--fg); }
.digest-hl { list-style: none; margin: 4px 0 8px; padding: 0; font-size: var(--fs-sm); display: grid; gap: 4px; }
.digest-hl a { color: var(--muted); }
.digest-hl a b { color: var(--fg); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Горячие клавиши */
.kb-focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.keys-hint { max-width: 1120px; margin: 0 auto; padding: 0 16px 32px; font-size: var(--fs-xs); color: var(--faint); }
.keys-hint kbd { font: 600 11px var(--mono); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 4px; color: var(--muted); }
@media (max-width: 720px), (hover: none) { .keys-hint { display: none; } }
