@font-face {
  font-family: Unbounded;
  src: url("/assets/Unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #fff;
  --sidebar: #f7f8fa;
  --surface: #fff;
  --raised: #fff;
  --field: #f4f6f9;
  --line: #dce3ee;
  --quiet-line: #e7ecf4;
  --text: #111a2c;
  --muted: #536078;
  --dim: #566783;
  --blue: #0047ff;
  --blue-text: #1348d2;
  --blue-hover: #205dff;
  --green: #137651;
  --amber: #875311;
  --red: #a72c46;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --sans: Inter, Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Unbounded, var(--sans);
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; background: var(--canvas); color: var(--text); font: 16px/1.5 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [contenteditable]:focus-visible {
  outline: 2px solid #7498ff; outline-offset: 3px;
}
img, video, audio { max-width: 100%; }
p, h1, h2, h3, dl, dd { margin: 0; }
form { margin: 0; }
input, textarea, select {
  background: var(--field); border: 1px solid transparent; border-radius: 8px; padding: 10px 12px;
  min-width: 0; outline: none;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #7498ff; outline-offset: 2px; }
textarea { resize: vertical; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
[data-icon] { display: inline-grid; place-items: center; flex: 0 0 auto; }
.icon { width: 17px; height: 17px; vertical-align: middle; }
.button, .icon-button, .tab, .format-button {
  border: 1px solid transparent; border-radius: 8px; background: var(--field);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 13px; font-size: 14px; font-weight: 580; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, transform 150ms var(--ease-out);
}
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.danger { color: var(--red); }
.button.ghost, .icon-button { background: transparent; border-color: transparent; color: var(--muted); }
.icon-button { width: 34px; min-height: 34px; padding: 0; }
.button:active, .icon-button:active, .format-button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover, .icon-button:hover, .format-button:hover { background: #eaf0fa; border-color: transparent; color: var(--text); }
  .button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
  .button.danger:hover { color: var(--red); }
  .nav a:hover, .tab:hover { color: var(--text); background: #f1f5fc; }
}
.mono, time, .nav-count { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100svh; }
.sidebar {
  position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 0; padding: 27px 15px 17px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; width: fit-content; }
.brand strong { display: block; font-family: var(--display); letter-spacing: -.035em; font-size: 14px; line-height: 1.1; }
.brand small, .account-label small { display: block; color: var(--dim); font-size: 11px; padding-top: 4px; }
.brand-mark {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 10px;
  background: transparent;
}
.nav { display: grid; gap: 3px; margin-top: 42px; }
.nav a {
  min-height: 43px; position: relative; padding: 0 11px; gap: 10px; display: flex; align-items: center;
  color: var(--muted); border: 0; border-radius: 8px; font-size: 14px; font-weight: 585;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav a[aria-current="page"] { color: #0047ff; background: #e9efff; }
.nav a[aria-current="page"] [data-icon] { color: var(--blue-text); }
.nav-count { margin-left: auto; color: var(--dim); font-size: 11px; }
.nav a[aria-current="page"] .nav-count { color: var(--blue-text); }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; border-top: 0; padding: 15px 5px 0; }
.account-avatar { width: 31px; height: 31px; border-radius: 8px; background: #e8effd; color: #234eae; display: grid; place-items: center; font-weight: 700; }
.account-label { flex: 1; line-height: 1; font-size: 11px; }
.workspace { min-width: 0; }
.topbar {
  border-bottom: 0; min-height: 62px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; padding: 0 clamp(18px, 3.15vw, 52px);
}
.breadcrumb, .topbar-status { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--dim); }
.breadcrumb strong { color: #24324b; font-weight: 580; }
.breadcrumb .slash { color: #8c98ab; padding-inline: 1px; }
.topbar-status { color: var(--muted); }
.indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.indicator.ok { background: var(--green); box-shadow: 0 0 0 3px #13765119; }
.indicator.off { background: var(--amber); box-shadow: 0 0 0 3px #87531116; }
.content { max-width: 1590px; margin: 0 auto; padding: 38px clamp(18px, 3.15vw, 52px) 48px; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 30px; }
.page-header h1 { font-family: var(--display); font-size: clamp(25px, 3.1vw, 37px); font-weight: 640; letter-spacing: -.047em; line-height: 1.18; }
.page-header p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 8px; }
.page-actions .button { min-height: 39px; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 36px; }
.metric {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0;
  padding: 6px 0; min-height: 76px; border: 0; border-radius: 8px; background: transparent;
}
.metric .label { font-size: 14px; color: var(--muted); display: block; }
.metric .value { margin-top: 8px; font-size: 30px; font-weight: 650; line-height: 1.08; letter-spacing: -.045em; }
.metric.current .value { color: var(--blue); }
.post-layout { display: grid; grid-template-columns: minmax(415px, 1.5fr) minmax(300px, 1fr); align-items: start; gap: 28px; }
.list-panel, .detail-panel, .settings-card { min-width: 0; background: var(--surface); border: 0; border-radius: 12px; }
.list-tools { display: flex; align-items: center; gap: 10px; padding: 0 0 18px; }
.search {
  background: var(--field); display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px; min-width: 140px; padding: 0 10px;
  width: min(100%, 285px); color: var(--dim);
}
.search:focus-within { outline: 2px solid #7498ff; outline-offset: 2px; }
.search input:focus-visible { outline: none; }
.search input { border: 0; background: transparent; width: 100%; padding: 7px 0; color: var(--text); outline: none; }
.list-tools select { margin-left: auto; width: auto; max-width: 42%; font-size: 12px; min-height: 35px; padding: 7px 8px; }
.post-table { display: grid; gap: 5px; }
.table-head, .post-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 100px 62px;
  align-items: center; column-gap: 10px; padding-inline: 16px;
}
.table-head { background: transparent; border: 0; min-height: 32px; margin-bottom: 4px; color: var(--dim); font-size: 12px; }
.post-row {
  text-align: left; width: 100%; background: transparent; color: var(--text); border: 0; min-height: 78px; padding-block: 12px; border-radius: 10px;
  border-bottom: 0; position: relative; transition: background-color 120ms ease;
}

.post-row[aria-pressed="true"] { background: #edf2ff; }
.post-row.swap-origin { background: #e3ecff; }
.post-row.swap-target:hover { background: #e8efff; }
@media (hover: hover) and (pointer: fine) { .post-row:hover { background: #f3f7ff; } }
.post-row:focus-visible { outline-offset: -3px; }
.post-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; font-size: 14px; font-weight: 580; line-height: 1.45;
}
.post-subtitle {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--dim); font-size: 12px; margin-top: 5px;
}
.post-time { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.post-time strong { font: 500 14px var(--mono); color: #203454; }
.post-time small { font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.score, .status { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; width: fit-content; font-size: 11px; line-height: 1; white-space: nowrap; }
.score { padding: 0; background: transparent; color: #214cb1; font: 500 14px var(--mono); }
.score.low { color: var(--amber); }
.status { padding: 6px 8px; font-size: 12px; color: #4b5b75; background: #edf1f7; }
.status::before { content: ""; display: block; flex: 0 0 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.blue { color: #204bb5; background: #e7efff; }
.status.green { color: var(--green); background: #e4f4ec; }
.status.yellow { color: var(--amber); background: #fbf0db; }
.status.red { color: var(--red); background: #fbeaf0; }
.swap-banner { color: #20487d; font-size: 12px; background: #e7efff; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pagination { padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; border-top: 0; }
.empty { display: grid; justify-items: center; text-align: center; gap: 5px; padding: 40px 16px; color: var(--dim); }
.empty .icon { width: 25px; height: 25px; }
.empty strong { color: #31415d; margin-top: 5px; }
.detail-panel { overflow: clip; background: #f7f8fa; }
.detail-header { padding: 22px 22px 16px; border-bottom: 0; }
.detail-meta { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.detail-meta .mono { font-size: 11px; color: var(--dim); }
.detail-header h2 { font-size: 20px; line-height: 1.4; font-weight: 620; letter-spacing: -.025em; margin: 14px 0 8px; overflow-wrap: anywhere; }
.detail-header p { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.detail-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 0; }
.tab { color: var(--muted); background: transparent; border: 0; border-radius: 7px; min-height: 34px; padding: 7px 10px; font-size: 14px; }
.tab[aria-pressed="true"] { color: #123fa9; background: #e8efff; }
.detail-body { padding: 20px 22px; }
.preview-frame { border: 0; background: #fff; border-radius: 10px; overflow: clip; }
.preview-head { display: flex; align-items: center; gap: 6px; color: #385783; padding: 16px 16px 0; font-size: 12px; background: transparent; }
.preview-head .icon { width: 14px; height: 14px; }
.telegram-text, .editor-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.65; }
.telegram-text { padding: 16px; color: #24334e; }
.telegram-text a, .editor-body a, a.text-link { color: #1249c8; text-decoration: underline; text-underline-offset: 2px; }
.telegram-text blockquote, .editor-body blockquote { margin: 5px 0; padding-left: 9px; border-left: 2px solid #668fff; color: #375087; }
tg-spoiler { border-radius: 3px; background: #cbd9f3; }
.telegram-text tg-spoiler { color: transparent; cursor: pointer; }
.telegram-text tg-spoiler.revealed, .telegram-text tg-spoiler:focus { color: var(--text); }
.media-grid { display: grid; gap: 4px; background: #edf2fa; }
.media-grid[data-many] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-item { min-width: 0; min-height: 34px; display: grid; place-items: center; color: var(--muted); background: #eff4fc; }
.media-item img, .media-item video { width: 100%; max-height: 210px; object-fit: contain; display: block; }
.media-item a, .media-item summary { padding: 8px; font-size: 12px; overflow-wrap: anywhere; }
.media-leftover { margin-top: 8px; }
.original { margin: 9px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.details { display: grid; gap: 8px; overflow-wrap: anywhere; }
.details div { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.25fr); gap: 10px; border-bottom: 0; padding-bottom: 7px; }
.details dt { font-size: 13px; color: var(--dim); }
.details dd { font-size: 14px; color: var(--text); }
details.metadata { margin-top: 18px; color: var(--muted); font-size: 12px; }
details.metadata summary { cursor: pointer; }
details.metadata dl { margin-top: 10px; }
.ai-reason { color: var(--muted); margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 22px; border-top: 0; }
.detail-actions .button { font-size: 14px; background: #fff; }
.detail-actions .button.primary { background: var(--blue); }
.editor-form { display: grid; gap: 12px; }
.editor-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.formatting { display: flex; gap: 4px; flex-wrap: wrap; padding: 5px; border-bottom: 0; background: #f0f3f8; }
.format-button { background: transparent; border-color: transparent; width: 30px; min-height: 29px; padding: 3px; font-size: 13px; }
.format-button[aria-pressed="true"] { color: #123fa9; background: #dce9ff; }
.editor-field { border: 0; border-radius: 7px; background: var(--field); overflow: clip; }
.editor-body { padding: 8px 10px; min-height: 135px; outline: none; }
.editor-body:focus-visible { outline-offset: -2px; }
.editor-counter { font-size: 11px; text-align: right; color: var(--dim); }
.warning { color: var(--amber); font-size: 12px; overflow-wrap: anywhere; }
.settings-layout { display: grid; grid-template-columns: minmax(290px, .8fr) minmax(380px, 1.2fr); gap: 36px; align-items: start; }
.settings-card { padding: 0; }
.settings-card h2 { font-size: 17px; font-weight: 640; }
.settings-card h3 { font-size: 14px; }
.settings-card p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.settings-card form { display: grid; gap: 18px; margin-top: 22px; }
.settings-card label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.settings-card input, .settings-card textarea { width: 100%; }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.form-rule { border: 0; width: 100%; height: 0; margin: 12px 0 0; }
.form-footer, .source-form { display: flex !important; gap: 8px; align-items: center; flex-wrap: wrap; }
.source-form input { flex: 1 1 145px; }
.source-list { display: grid; gap: 0; padding: 0; margin: 9px 0 0; list-style: none; }
.source-list li { display: grid; gap: 5px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: 12px 0; border-bottom: 0; }
.source-name { overflow-wrap: anywhere; font-size: 14px; }
.login-screen, .boot { min-height: 100svh; display: grid; place-content: center; gap: 14px; padding: 20px; justify-items: center; }
.login-card { width: min(100vw - 40px, 360px); background: var(--surface); border: 0; border-radius: 12px; padding: 24px; display: grid; gap: 10px; }
.login-card h1 { font-family: var(--display); font-size: 24px; font-weight: 630; letter-spacing: -.05em; }
.login-card p { color: var(--muted); }
.login-card label { font-size: 12px; margin-top: 6px; }
.login-card .button { margin-top: 7px; }
.boot { color: var(--muted); }
.notification {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 3; padding: 11px 14px; max-width: min(440px, calc(100% - 32px)); background: #eef4ff;
  border: 0; border-radius: 8px; box-shadow: 0 8px 25px #1b3b6d23; color: #1d335b;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.notification.error { background: #fff0f3; border-color: #f3c3d0; }
@starting-style { .notification:not([hidden]) { opacity: 0; transform: translateY(5px); } }
.dialog { background: var(--surface); color: var(--text); border: 0; border-radius: 12px; padding: 20px; width: min(450px, calc(100% - 30px)); box-shadow: 0 20px 80px #21355737; }
.dialog::backdrop { background: #20334d55; }
.dialog h2 { font-size: 19px; letter-spacing: -.026em; }
.dialog #dialog-body { margin: 11px 0 16px; color: var(--muted); overflow-wrap: anywhere; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog .dialog-field { display: grid; gap: 4px; }
.dialog .swap-confirm { display: grid; gap: 6px; }
.dialog .swap-confirm strong { color: var(--text); }
@media (max-width: 1120px) {
  .shell { grid-template-columns: 182px minmax(0, 1fr); }
  .post-layout { grid-template-columns: minmax(315px, 1.25fr) minmax(285px, 1fr); gap: 12px; }
  .table-head, .post-row { grid-template-columns: minmax(0, 1fr) 76px 48px; gap: 8px; padding-inline: 12px; }
}
@media (max-width: 875px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { z-index: 2; display: flex; flex-direction: row; height: auto; align-items: center; padding: 5px 12px; border-bottom: 0; border-right: 0; gap: 9px; }
  .brand { padding: 0; }
  .brand > span + span { display: none; }
  .brand-mark { width: 35px; height: 35px; }
  .nav { margin: 0; display: flex; gap: 3px; overflow-x: auto; min-width: 0; }
  .nav a { min-height: 38px; white-space: nowrap; gap: 6px; padding: 0 7px; }
  .nav-count { display: none; }
  .sidebar-footer { border: 0; padding: 0; margin: 0 0 0 auto; }
  .sidebar-footer > :not(button) { display: none; }
  .topbar { min-height: 44px; }
  .content { padding-top: 24px; }
}
@media (max-width: 670px) {
  .nav a { font-size: 12px; }
  .nav a [data-icon] { display: none; }
  .page-header { align-items: start; flex-direction: column; gap: 11px; margin-bottom: 16px; }
  .overview { gap: 6px; margin-bottom: 13px; }
  .metric { padding: 4px 0; gap: 3px; min-height: 64px; }
  .metric .label { font-size: 12px; }
  .metric .value { font-size: 22px; }
  .post-layout, .settings-layout { grid-template-columns: 1fr; }
  .detail-panel { scroll-margin-top: 62px; }
  .topbar-status { font-size: 11px; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .button:active, .icon-button:active, .format-button:active { transform: none; }
}

.editor-form + .preview-frame { margin-top: 12px; }
.preview-frame + .warning { margin-top: 8px; }

.status-layout {
  display: grid; grid-template-columns: minmax(350px, 1.2fr) minmax(330px, 1fr);
  gap: 40px; align-items: start;
}
.status-stack { display: grid; gap: 32px; min-width: 0; }
.status-card {
  min-width: 0; padding: 0; background: transparent; border: 0; border-radius: 0;
}
.status-card h2 { font-size: 16px; font-weight: 660; letter-spacing: -.02em; }
.status-card p { margin-top: 7px; color: var(--muted); overflow-wrap: anywhere; }
.status-card p.warning { color: var(--amber); }
.status-card .details { margin-top: 10px; }
.service-list { list-style: none; padding: 0; margin: 9px 0 0; }
.service-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  gap: 5px 12px; padding: 14px 0; border-bottom: 0;
}
.service-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.service-name { font-weight: 580; font-size: 14px; overflow-wrap: anywhere; }
.service-age { color: var(--dim); margin-left: 8px; font-size: 11px; }
.service-detail { grid-column: 1 / -1; color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.status-timestamp { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.status-timestamp small { color: var(--dim); }
.pipeline-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; margin-top: 20px; }
.pipeline-counts div { padding: 0; background: transparent; border: 0; }
.pipeline-counts dt { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.pipeline-counts dd { color: var(--text); margin-top: 5px; font: 550 21px var(--mono); }
@media (max-width: 1050px) and (min-width: 876px), (max-width: 740px) {
  .status-layout { grid-template-columns: 1fr; }
}

@media (max-width: 670px) {
  .sidebar { display: grid; grid-template-columns: 1fr auto; column-gap: 0; row-gap: 3px; }
  .brand > span + span { display: block; }
  .brand small { display: none; }
  .sidebar-footer { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; overflow: visible; }
  .nav a { justify-content: center; min-height: 34px; padding: 0 2px; font-size: clamp(9px, 2.8vw, 12px); }
  .detail-panel { scroll-margin-top: 90px; }
}
