:root {
  --bg: #0d0e12;
  --panel: #15171d;
  --panel-2: #1b1e26;
  --line: #262a35;
  --line-soft: #1f222b;
  --text: #e8eaf0;
  --muted: #8b90a0;
  --faint: #5d6272;
  --blue: #5b8cff;
  --violet: #9a7bff;
  --amber: #e0a84a;
  --rose: #ff6b81;
  --radius: 14px;
  --font: ui-sans-serif, -apple-system, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(91, 140, 255, 0.08), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
[hidden] { display: none !important; }

.app { max-width: 1180px; margin: 0 auto; padding: 0 20px 64px; }

/* шапка */
.top { display: flex; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; }
.brand img { width: 28px; height: 28px; }
.brand small { color: var(--faint); font-weight: 400; font-size: 12px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 7px 13px; border-radius: 9px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.top .spacer { flex: 1; }
.demo { color: var(--amber); font-size: 12px; border: 1px solid rgba(224, 168, 74, 0.4); border-radius: 999px; padding: 2px 10px; }

/* кнопки и поля */
.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 500; transition: background 0.15s, border-color 0.15s; }
.btn:hover { border-color: #363b4a; background: #20242e; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.on { border-color: var(--blue); color: var(--blue); background: rgba(91, 140, 255, 0.1); }
.btn.on.skip { border-color: var(--rose); color: var(--rose); background: rgba(255, 107, 129, 0.08); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type='text'], input[type='password'], input[type='number'], input[type='time'], select, textarea {
  width: 100%; background: #101218; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
textarea { resize: vertical; min-height: 68px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.hint { color: var(--faint); font-size: 12.5px; margin-top: 5px; }

.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* штаб */
.hq { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.org { display: flex; flex-direction: column; align-items: stretch; }
.wire { width: 2px; height: 22px; margin-left: 35px; background: linear-gradient(var(--line), var(--line)); position: relative; }
.wire.live { background: linear-gradient(var(--violet), var(--blue)); }
.wire span { position: absolute; left: 12px; top: 2px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.node { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px 16px; }
.node.working { border-color: rgba(91, 140, 255, 0.55); box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.08); }
.node.error { border-color: rgba(255, 107, 129, 0.4); }
.node.board { background: linear-gradient(135deg, rgba(91, 140, 255, 0.1), rgba(154, 123, 255, 0.1)); border-color: rgba(154, 123, 255, 0.3); }
.avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 16px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.node.chief .avatar { background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff; border-color: transparent; }
.node.board .avatar { background: #fff; color: #14161c; border-color: transparent; }
.node-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.chip { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #101218; white-space: nowrap; }
.chip.blue { color: var(--blue); border-color: rgba(91, 140, 255, 0.4); }
.chip.violet { color: var(--violet); border-color: rgba(154, 123, 255, 0.4); }
.chip.amber { color: var(--amber); border-color: rgba(224, 168, 74, 0.4); }
.chip.rose { color: var(--rose); border-color: rgba(255, 107, 129, 0.4); }
.chip.off { opacity: 0.45; text-decoration: line-through; }
.node-role { color: var(--muted); font-size: 13px; margin-top: 2px; }
.node-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.bar { flex: 0 0 110px; height: 5px; border-radius: 5px; background: #23262f; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--violet)); border-radius: 5px; }
.bar.hot i { background: var(--rose); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.working .dot { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.paused .dot { background: var(--amber); }
.error .dot { background: var(--rose); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(91, 140, 255, 0.6); } 50% { box-shadow: 0 0 0 6px rgba(91, 140, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .working .dot { animation: none; } }
.node-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.sources b { font-size: 12px; color: var(--faint); font-weight: 500; margin-right: 4px; align-self: center; }

.next-time { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; }
.next-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.check .mark { flex: 0 0 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); margin-top: 1px; display: grid; place-items: center; font-size: 11px; }
.check li.ok .mark { border-color: var(--blue); background: var(--blue); color: #fff; }
.check li.ok { color: var(--muted); }

/* вердикт */
.lead { font-size: 16px; font-weight: 600; line-height: 1.4; }
.pick { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 14px; }
.pick-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pick-head h3 { font-size: 15px; }
.conf { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--violet); white-space: nowrap; }
.why { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.draft { margin-top: 10px; background: #101218; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 10px; padding: 10px 12px; }
.draft p { white-space: pre-wrap; }
.draft-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--faint); }
.pick-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.pick-foot .grow { flex: 1; }
.skip-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13.5px; color: var(--muted); }

/* выпуски */
.runs { display: grid; gap: 8px; }
.run-row { display: grid; grid-template-columns: 56px 150px minmax(0, 1fr) 90px 70px; gap: 12px; align-items: center; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; color: inherit; }
.run-row:hover { border-color: var(--line); text-decoration: none; background: #171a21; }
.run-row .num { color: var(--faint); font-variant-numeric: tabular-nums; }
.run-row .topics { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-row .cost { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
details.step { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; }
details.step + details.step { margin-top: 10px; }
details.step summary { list-style: none; cursor: pointer; padding: 13px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.step summary::-webkit-details-marker { display: none; }
details.step summary b { font-weight: 600; }
details.step summary .grow { flex: 1; }
.step-body { padding: 0 16px 16px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.dossier { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; color: #cfd3de; max-height: 560px; overflow: auto; }
.theme { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.theme:first-child { border-top: 0; padding-top: 0; }
.theme-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.theme.junk .theme-head span.t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.theme p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.err { color: var(--rose); font-size: 13.5px; }

/* настройки */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.settings .card + .card { margin-top: 20px; }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 10px; align-items: end; }
.row.c2 { grid-template-columns: 1fr 1fr; }
.row.c3 { grid-template-columns: 1.4fr 1fr 0.8fr; }
.row.slot { grid-template-columns: 120px 1fr auto; margin-bottom: 8px; }
.agent-set { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.agent-set:first-of-type { border-top: 0; padding-top: 0; }
.toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; color: var(--text); font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--blue); }
.secret { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 14px; }
.secret .state { font-size: 12px; margin-left: 6px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.kbd { font-family: var(--mono); background: #101218; border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; font-size: 13px; }

/* вход */
.login { min-height: 100vh; display: grid; place-items: center; }
.login .card { width: min(380px, 100%); padding: 28px; }
.login h1 { font-size: 22px; margin: 14px 0 6px; }
.login form { margin-top: 18px; display: grid; gap: 12px; }

/* отступы вместо встроенных стилей: политика безопасности страницы их запрещает */
[data-mt='6'] { margin-top: 6px; }
[data-mt='8'] { margin-top: 8px; }
[data-mt='10'] { margin-top: 10px; }
[data-mt='12'] { margin-top: 12px; }
[data-mt='14'] { margin-top: 14px; }
[data-mt='20'] { margin-top: 20px; }
[data-mb='10'] { margin-bottom: 10px; }
[data-mb='12'] { margin-bottom: 12px; }
[data-my='10'] { margin: 10px 0; }
[data-m0b='14'] { margin: 0 0 14px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #232733; border: 1px solid #363b4a; border-radius: 12px; padding: 10px 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); z-index: 10; max-width: calc(100vw - 40px); }
.toast.bad { border-color: rgba(255, 107, 129, 0.5); color: #ffb3bf; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }

@media (max-width: 980px) {
  .hq, .detail, .settings { grid-template-columns: minmax(0, 1fr); }
  .run-row { grid-template-columns: 44px minmax(0, 1fr) 70px; }
  .run-row .when, .run-row .state { display: none; }
}
@media (max-width: 560px) {
  .app { padding: 0 14px 48px; }
  .node { grid-template-columns: 38px minmax(0, 1fr); }
  .node-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .avatar { width: 38px; height: 38px; }
  .wire { margin-left: 32px; }
  .row.c2, .row.c3 { grid-template-columns: 1fr; }
  .next-time { font-size: 26px; }
}

/* Радар: графитовый рабочий пульт */
:root {
  --bg: #090b10;
  --panel: #11141c;
  --panel-2: #191d29;
  --line: #303748;
  --line-soft: #242a38;
  --text: #f0f2f8;
  --muted: #a1a9ba;
  --faint: #8993a7;
  --blue: #80a8ff;
  --violet: #b8a5ff;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
body {
  background: #090b10;
  background-image: radial-gradient(ellipse 800px 400px at 76% -160px, rgba(77, 95, 183, .13), transparent 72%);
  min-height: 100dvh;
}
.app { max-width: 1600px; padding: 0 48px 80px; }
.top { min-height: 82px; margin-bottom: 0; padding: 16px 0; gap: 44px; border-bottom-color: #252b39; }
.brand { gap: 11px; flex-shrink: 0; color: var(--text); line-height: 1; letter-spacing: .14em; font-size: 15px; font-weight: 750; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { display: grid; gap: 6px; }
.brand small { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .1em; color: #8c96aa; }
.nav { gap: 7px; margin-left: 0; }
.nav a { padding: 10px 15px; border-radius: 7px; font-size: 13px; }
.nav a.on { background: #1b2030; box-shadow: inset 0 0 0 1px #343e55; }
.top .btn { font-size: 12px; }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 44px 0 30px; }
.page-intro.compact { padding-bottom: 25px; }
.page-intro h1 { font-size: clamp(32px, 3.2vw, 49px); line-height: 1.07; letter-spacing: -.05em; font-weight: 650; }
.title-dot { color: #94a9ff; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-family: var(--mono); font-size: 10px; line-height: 1.3; font-weight: 600; letter-spacing: .14em; color: #9caad1; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: #97a7ff; }
.intro-copy { color: #9aa4b8; margin-top: 11px; font-size: 14px; }
.intro-status { display: flex; align-items: center; gap: 9px; color: #aeb8ce; font-family: var(--mono); font-size: 11px; padding-bottom: 4px; white-space: nowrap; }
.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: #8191b4; box-shadow: 0 0 12px #6a7fae; }
.signal-dot.active { background: #a99bff; box-shadow: 0 0 12px #a99bff; }
.hq { grid-template-columns: minmax(0, 1.5fr) minmax(350px, .82fr); gap: 18px; }
.org { display: block; position: relative; overflow: hidden; border: 1px solid #2b3242; border-radius: 12px; padding: 25px; background: #11141c; }
.org::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .15; background-image: linear-gradient(#485675 1px, transparent 1px), linear-gradient(90deg, #485675 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(transparent, black 28%, black 80%, transparent); }
.graph-heading, .graph-map, .graph-caption, .sources { position: relative; }
.graph-heading { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.graph-heading .eyebrow { margin-bottom: 8px; }
.graph-heading h2 { font-size: 22px; letter-spacing: -.03em; }
.graph-key { display: flex; align-items: center; gap: 8px; font: 9px var(--mono); letter-spacing: .1em; color: #94a0b6; white-space: nowrap; }
.graph-key span { width: 20px; height: 1px; background: #8e9ded; }
.graph-caption { margin-top: 9px; color: #9ca7ba; font-size: 12px; }
.graph-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 26px; margin: 26px 0 28px; }
.graph-map::before, .graph-map::after { content: ''; position: absolute; pointer-events: none; z-index: 0; }
.graph-map::before { left: 24%; right: 24%; top: 25%; bottom: 25%; border: 1px dashed #56638a; border-radius: 8px; }
.graph-map::after { left: 50%; top: 0; bottom: 0; border-left: 1px dashed rgba(113, 129, 185, .34); }
.node { z-index: 1; position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; padding: 17px; background: #171c28; border-color: #353d51; border-radius: 9px; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.node.board { background: #21243a; border-color: #615b98; }
.node.chief { background: #1b1e31; border-color: #4f4b78; }
.node.working { border-color: #93aaff; box-shadow: 0 0 0 2px rgba(122,145,255,.13), 0 12px 30px rgba(0,0,0,.2); }
.node.error { border-color: #9f5e73; }
.avatar { width: 39px; height: 39px; border-radius: 7px; background: #242d43; border-color: #465774; color: #a4c2ff; font-family: var(--mono); font-size: 14px; }
.node.chief .avatar { background: #4d477b; border-color: #786da9; }
.node.board .avatar { background: #d9d9ff; color: #262345; }
.node-title { font-size: 14px; line-height: 1.3; gap: 6px; }
.node-role { font-size: 12px; line-height: 1.5; color: #aab2c3; margin-top: 7px; }
.node-meta { font-family: var(--mono); font-size: 10px; line-height: 1.5; margin-top: 10px; color: #909bb0; }
.node-side { grid-column: 1 / -1; align-items: center; justify-content: space-between; flex-direction: row; gap: 8px; border-top: 1px solid #343b4d; padding-top: 11px; margin-top: 1px; }
.node-side .status { font-size: 11px; }
.sources { display: flex; align-items: center; gap: 7px; padding: 14px 0 0; border: 0; border-top: 1px solid #343b4c; border-radius: 0; }
.sources b { color: #aebad1; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-right: 7px; }
.chip { background: #121721; border-color: #394255; color: #b6c0d2; font-size: 10px; line-height: 1.35; white-space: normal; }
.chip.blue { color: #b1c7ff; border-color: #4b6494; }
.chip.violet { color: #d1c4ff; border-color: #675a91; }
.chip.amber { color: #f1c47c; border-color: #806641; }
.chip.rose { color: #ffb3bf; border-color: #855260; }
.chip.off { opacity: .65; }
.card { padding: 22px; background: #121720; border-color: #2b3241; border-radius: 10px; }
.card + .card { margin-top: 14px; }
.card-head { margin-bottom: 16px; }
.card-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.schedule-card { position: relative; overflow: hidden; background: #1c2134; border-color: #444e70; }
.schedule-card::after { content: ''; position: absolute; pointer-events: none; right: -26px; top: -48px; width: 170px; height: 170px; border: 1px solid rgba(165,178,255,.16); border-radius: 50%; box-shadow: 0 0 0 28px rgba(145,160,255,.025), 0 0 0 55px rgba(145,160,255,.025); }
.schedule-card > * { position: relative; z-index: 1; }
.next-time { font-family: var(--mono); font-size: clamp(32px, 3.2vw, 46px); font-weight: 500; letter-spacing: -.06em; }
.next-row { margin: 22px 0 16px; align-items: end; flex-wrap: wrap; }
.next-row .muted { font-size: 12px; margin-top: 7px; }
.next-row .btn { min-height: 42px; }
.schedule-card .hint { font-family: var(--mono); font-size: 10px; color: #a9b4ca; }
.btn { min-height: 37px; border-color: #384155; background: #202736; border-radius: 7px; font-size: 13px; }
.btn:hover { background: #2c3548; border-color: #7185b0; text-decoration: none; }
.btn.primary { background: #a6b8ff; color: #11172a; font-weight: 700; box-shadow: 0 6px 20px rgba(91,112,210,.14); }
.btn.primary:hover { background: #c1ccff; filter: none; }
.btn.small { min-height: 32px; border-radius: 6px; }
.btn.ghost { background: transparent; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline-color: #b7c6ff; }
input[type='text'], input[type='password'], input[type='number'], input[type='time'], select, textarea { background: #0c1018; border-color: #374155; border-radius: 7px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #8fa7ff; outline-offset: 1px; }
label { color: #b0b9ca; }
.hint, .faint { color: #99a4b8; }
.lead { font-size: 16px; }
.verdict-card .empty { min-height: 100px; display: grid; place-items: center; }
.pick-head { flex-wrap: wrap; }
.conf { color: #c8baff; font-size: 12px; }
.draft { background: #0c1018; border-color: #333c4d; border-left-color: #9baeff; border-radius: 7px; }
.run-row { background: #131822; border-color: #2a3241; }
.run-row:hover { background: #1b2230; border-color: #6679a2; }
.run-row .num, .run-row .cost { color: #afbbd0; }
.runs .empty { background: #121720; border: 1px solid #2b3241; border-radius: 10px; }
.settings .row.c3 { grid-template-columns: 1.4fr 1fr; }
.settings .card + .card { margin-top: 14px; }
.login .card { background: #141925; border-color: #38435c; padding: 32px; box-shadow: 0 28px 80px rgba(0,0,0,.3); }
.login h1 { font-size: 30px; letter-spacing: -.04em; }
.toast { background: #252c3d; border-color: #53617d; }
@media (max-width: 1100px) {
  .app { padding-left: 28px; padding-right: 28px; }
  .hq { grid-template-columns: minmax(0, 1fr); }
  .hq aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .hq aside .card + .card { margin-top: 0; }
  .verdict-card { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .app { padding: 0 16px 48px; }
  .top { gap: 13px; padding: 15px 0; }
  .brand { flex: 1; }
  .top .spacer { display: none; }
  .nav { order: 4; width: 100%; margin-top: 3px; border-top: 1px solid #252b39; padding-top: 10px; }
  .nav a { flex: 1; text-align: center; padding: 9px 6px; }
  .page-intro { padding: 31px 0 24px; align-items: start; }
  .intro-status { display: none; }
  .org { padding: 18px; }
  .graph-key { display: none; }
  .graph-heading h2 { font-size: 19px; }
  .graph-map { gap: 22px 14px; }
  .node { grid-template-columns: 34px minmax(0, 1fr); padding: 12px; gap: 9px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .node-side { padding-top: 9px; }
  .node-side .btn { padding: 5px 7px; font-size: 11px; }
  .node-role { font-size: 11px; }
  .node-meta { font-size: 9px; overflow-wrap: anywhere; }
  .hq aside { grid-template-columns: minmax(0, 1fr); }
  .verdict-card { grid-column: auto; }
  .card { padding: 18px; }
  .next-time { font-size: 36px; }
  .row.c2, .row.c3, .settings .row.c3 { grid-template-columns: 1fr; }
  .row.slot { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .run-row { grid-template-columns: 45px minmax(0, 1fr) auto; }
  .run-row .state { display: inline; }
  .run-row .cost { display: none; }
  .run-row .topics { white-space: normal; }
}
@media (max-width: 390px) {
  .graph-map { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .graph-map::before { display: none; }
  .graph-map::after { left: 30px; }
  .node-side { grid-column: 1 / -1; }
  .next-row { align-items: start; flex-direction: column; }
  .next-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.pipeline-status { list-style: none; padding: 15px 0 5px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; border-top: 1px solid rgba(170,184,225,.18); }
.pipeline-status li { min-width: 0; display: flex; align-items: start; gap: 6px; color: #a3acc1; font-size: 11px; line-height: 1.2; }
.pipeline-status li small { display: block; margin-top: 4px; color: #a3acc1; font-size: 9px; }
.pipeline-status li.running { color: #e0dcff; }
.pipeline-status li.failed { color: #ffb3bf; }
.progress-mark { width: 13px; height: 13px; flex: 0 0 13px; border: 1px solid #71809e; border-radius: 50%; display: grid; place-items: center; font-size: 9px; }
.pipeline-status .done .progress-mark { background: #98aaff; color: #1b2337; border-color: #98aaff; }
.pipeline-status .running .progress-mark { background: #bdadff; border-color: #bdadff; box-shadow: 0 0 10px rgba(185,166,255,.7); }
.pipeline-status .failed .progress-mark { border-color: #ffb3bf; }

/* Порядок соответствует движению материала между агентами. */
.graph-map::before, .graph-map::after { display: none; }
.graph-map .scout { grid-column: 1; grid-row: 1; }
.graph-map .analyst { grid-column: 2; grid-row: 1; }
.graph-map .chief { grid-column: 2; grid-row: 2; }
.graph-map .board { grid-column: 1; grid-row: 2; }
.graph-map .scout::after, .graph-map .analyst::after, .graph-map .chief::after {
  position: absolute; z-index: 2; color: #bdc9ff; font: 20px/1 var(--mono); pointer-events: none;
}
.graph-map .scout::after { content: '→'; right: -24px; top: calc(50% - 10px); }
.graph-map .analyst::after { content: '↓'; bottom: -28px; left: calc(50% - 10px); }
.graph-map .chief::after { content: '←'; left: -24px; top: calc(50% - 10px); }
.eyebrow { font-size: 11px; }
.brand small, .graph-key { font-size: 10px; }
.node-role { font-size: 13px; }
.node-meta { font-size: 11px; }
.chip { font-size: 11px; }
.schedule-card .hint { font-size: 11px; }
.pipeline-status li small { font-size: 10px; }
.run-row { grid-template-columns: 56px 150px minmax(0, 1fr) 110px; }
@media (max-width: 980px) {
  .run-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
}
@media (max-width: 700px) {
  .hq aside { display: contents; }
  .hq .schedule-card { order: 1; }
  .hq .org { order: 2; }
  .hq aside > .card:not(.schedule-card) { order: 3; margin-top: 0; }
  .node-role { font-size: 12px; }
  .node-meta { font-size: 11px; }
  .node-side .btn { font-size: 12px; }
  .run-row { grid-template-columns: 45px minmax(0, 1fr) auto; }
}
@media (max-width: 390px) {
  .graph-map { gap: 24px; }
  .graph-map .scout, .graph-map .analyst, .graph-map .chief, .graph-map .board { grid-column: auto; grid-row: auto; }
  .graph-map .scout::after, .graph-map .analyst::after, .graph-map .chief::after { content: '↓'; left: calc(50% - 10px); right: auto; top: auto; bottom: -24px; }
}
@media (max-width: 390px) {
  .secret { grid-template-columns: minmax(0, 1fr); }
  .secret .actions { margin-top: 0; }
  .top { gap: 6px; }
  .brand { font-size: 13px; gap: 7px; min-width: 0; }
  .brand img { width: 30px; height: 30px; }
  .brand small { font-size: 9px; }
  .demo { font-size: 10px; padding: 2px 5px; white-space: nowrap; }
  .top .btn.small { padding: 5px 7px; }
}
@media (max-width: 700px) {
  .btn.small { min-height: 44px; padding: 9px 12px; }
  .pick-foot > span:first-child { flex-basis: 100%; }
  .pick-foot .grow { display: none; }
  .pick-foot .btn { flex: 1; }
  .draft-foot .btn { min-width: 112px; }
  .btn:disabled { opacity: 1; color: #8791a5; background: #242b38; border-color: #343e4d; box-shadow: none; cursor: not-allowed; }
}
@media (max-width: 390px) { .top .btn.small { padding: 8px 7px; } }
@media (max-width: 700px) { .next-row .btn { min-height: 44px; } }
@media (min-width: 1101px) {
  .hq .org { grid-column: 1; grid-row: 1; }
  .hq aside { grid-column: 2; grid-row: 1; }
}
