@font-face{font-family:Onest;src:url('/static/fonts/Onest-Variable.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
:root {
  --bg: #f6f7f4; --card: #ffffff; --text: #1d231f; --muted: #66706a; --line: #e2e6e1;
  --accent: #2f7d4f; --accent-ink: #ffffff; --err: #b3261e;
  --p0: #b3261e; --p1: #c2610c; --p2: #8a6d00; --p3: #5b6b62;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121513; --card: #1a1f1c; --text: #e6ebe7; --muted: #95a09a; --line: #2a312d;
    --accent: #5cc486; --accent-ink: #0d1a12; --err: #ff8a80;
    --p0: #ff8a80; --p1: #ffb366; --p2: #e6c85c; --p3: #9fb0a6;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 17px; margin: 0 0 12px; }
.top { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 40px auto; }
.muted { color: var(--muted); }
.err { color: var(--err); }
.warn { color: var(--p1); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px; }
input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; cursor: pointer; border-radius: 8px; padding: 9px 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.link { border: 0; background: none; color: var(--muted); padding: 4px; }
.stack { display: grid; gap: 12px; }
.stack label { display: grid; gap: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row input[name=url] { flex: 1 1 260px; }
.inline { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.inline input { width: 84px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.url { overflow-wrap: anywhere; min-width: 220px; }
tr.dim td { color: var(--muted); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); }
.s-done { border-color: var(--accent); color: var(--accent); }
.s-running, .s-queued { border-color: var(--p2); color: var(--p2); }
.s-failed { border-color: var(--err); color: var(--err); }
.sev { font-size: 12px; font-weight: 600; margin-right: 4px; }
.P0 { color: var(--p0); } .P1 { color: var(--p1); } .P2 { color: var(--p2); } .P3 { color: var(--p3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; }
.tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; }
.files { margin: 0; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 12px 0; }
.progress div { height: 100%; background: var(--accent); transition: width .4s; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 6px; }
.fix { color: var(--muted); margin: 8px 0; }
.issues { margin: 0; padding-left: 18px; }
.issues li { margin: 6px 0; overflow-wrap: anywhere; }
.ev { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.ev i { font-style: normal; opacity: .75; }
.ok { color: var(--accent); }
.small { font-size: 13px; }
select, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; }
textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--bg);
  padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
button.danger { color: var(--err); border-color: var(--err); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid > .card { margin-bottom: 0; }
a.card.project { color: var(--text); display: block; transition: border-color .15s; }
a.card.project:hover { border-color: var(--accent); text-decoration: none; }
a.card.project h2 { overflow-wrap: anywhere; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); }
.chip.on { border: 1px solid var(--accent); color: var(--accent); }
.chip.warn { border: 1px solid var(--p2); color: var(--p2); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs.sub { margin: 0 0 14px; }
th a { color: var(--muted); }
.steps { padding-left: 20px; }
.steps li { margin: 6px 0; }
.connected { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.connected form { margin-top: 8px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 8px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; }
@media (max-width: 560px) {
  .card { padding: 14px; }
  h1 { font-size: 19px; }
}
.help { max-width: 820px; margin: 0 auto 16px; line-height: 1.6; }
.help h1 { font-size: 24px; }
.help h2 { font-size: 18px; margin: 28px 0 10px; }
.help ol { padding-left: 22px; }
.help li { margin: 8px 0; }
.lead { font-size: 16px; }
.note { border-left: 3px solid var(--accent); background: var(--bg); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 14px 0; }
.kv { margin: 10px 0; }
.kv td { border-bottom: 1px solid var(--line); padding: 10px; }
.faq dt { font-weight: 600; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--muted); }
kbd { font-family: ui-monospace, Consolas, monospace; font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }
.help-link { margin: 10px 0; }

/* --- оболочка проекта ------------------------------------------------ */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 20px; max-width: 1320px; margin: 0 auto; padding: 16px; }
.side { position: sticky; top: 16px; align-self: start; }
.side-site { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); margin-bottom: 12px; overflow-wrap: anywhere; }
.side-site:hover { text-decoration: none; border-color: var(--accent); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.side-nav a:hover { background: var(--card); text-decoration: none; }
.side-nav a.on { background: var(--card); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-group { margin: 14px 12px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pill { margin-left: auto; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.dot-ok, .dot-warn, .dot-off { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--accent); } .dot-warn { background: var(--p2); } .dot-off { background: var(--line); }
.side-nav a .dot-ok:first-of-type, .side-nav a .dot-warn:first-of-type, .side-nav a .dot-off:first-of-type { margin-left: auto; }
.main { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { font-size: 24px; }
.page-head p { margin: 4px 0 0; max-width: 720px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card-head h2 { margin-bottom: 8px; }
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn:hover { text-decoration: none; opacity: .92; }
.empty { text-align: left; }
.inline-form { display: inline; margin: 0; }
.small-gap { gap: 6px; margin-bottom: 8px; }
.warn { color: var(--p1); }

/* показатели */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: grid; gap: 4px; color: var(--text); }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi small { font-size: 12px; }
.delta { font-size: 13px; font-weight: 600; margin-left: 4px; }
.delta.up { color: var(--accent); } .delta.down { color: var(--err); }

/* рекомендации */
.rec-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.rec-list.compact { border: 0; background: none; }
.rec-row + .rec-row { border-top: 1px solid var(--line); }
.rec-row a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; color: var(--text); }
.rec-list.compact .rec-row a { padding: 10px 0; }
.rec-row a:hover { text-decoration: none; background: var(--bg); }
.rec-main { display: grid; gap: 2px; min-width: 0; }
.rec-title { font-weight: 600; overflow-wrap: anywhere; }
.rec-sub { font-size: 13px; }
.rec-meta { display: flex; gap: 12px; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prio { display: inline-block; min-width: 30px; text-align: center; font-size: 12px; font-weight: 700; padding: 3px 6px;
  border-radius: 6px; border: 1px solid currentColor; }
.prio.P0 { color: var(--p0); } .prio.P1 { color: var(--p1); } .prio.P2 { color: var(--p2); } .prio.P3 { color: var(--p3); }
.effort { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; color: var(--muted); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.chips .chip.on, a.chip.on { border-style: solid; border-color: var(--accent); color: var(--accent); }
a.chip:hover { text-decoration: none; color: var(--text); }
.st-new { border-color: var(--p2); color: var(--p2); }
.st-accepted, .st-in_progress { border-color: var(--p1); color: var(--p1); }
.st-done { border-color: var(--accent); color: var(--accent); border-style: dashed; }
.st-confirmed { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.st-not_confirmed { border-color: var(--err); color: var(--err); }
.st-rejected, .st-obsolete { color: var(--muted); }
.rec-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); align-items: start; }
.rec-grid .card { margin-bottom: 16px; }
.brief { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.brief h3 { font-size: 17px; margin: 4px 0 10px; }
.brief h4 { font-size: 14px; margin: 16px 0 6px; }
.brief-sections > li { margin: 10px 0; }
.kv td:first-child { color: var(--muted); white-space: nowrap; padding-right: 14px; }
.src-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.src-row:first-of-type { border-top: 0; }
.url-title { overflow-wrap: anywhere; }
.profile textarea { font-family: inherit; font-size: 14px; }
.profile label { display: grid; gap: 6px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .side { position: static; }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .side-nav a { white-space: nowrap; border: 1px solid var(--line); }
  .side-group { display: none; }
  .rec-grid { grid-template-columns: 1fr; }
  .rec-row a { grid-template-columns: auto minmax(0, 1fr); }
  .rec-meta { grid-column: 2; }
}

/* --- Design v3: Pulse -------------------------------------------------- */
:root {
  color-scheme: light;
  --bg:#f4f5fa; --surface:#fff; --card:#fff; --surface-2:#f7f8fc; --surface-3:#eceef6;
  --text:#303447; --text-strong:#121522; --muted:#70768a; --muted-2:#9ba0b1;
  --line:#e1e4ed; --line-strong:#cfd3df; --accent:#6657f5; --accent-hover:#5143df;
  --accent-soft:#eeecff; --accent-ink:#fff; --signal:#f07354; --good:#168c72;
  --series-1:#6f61ff; --series-2:#20ad92; --radius:14px; --radius-lg:16px;
  --shadow-xs:0 5px 20px rgba(30,35,60,.05); --shadow-sm:0 14px 35px rgba(30,35,60,.09);
}
@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]){color-scheme:dark;--bg:#0b0d13;--surface:#141720;--card:#141720;--surface-2:#181b25;--surface-3:#222633;--text:#cdd1df;--text-strong:#f5f6fb;--muted:#9399aa;--muted-2:#6e7486;--line:#282c38;--line-strong:#3a3f50;--accent:#8278ff;--accent-hover:#9a92ff;--accent-soft:#292653;--accent-ink:#fff;--signal:#ff8165;--good:#4ac6a5;--series-1:#8378ff;--series-2:#4bc9ac;--shadow-xs:0 8px 30px rgba(0,0,0,.16);--shadow-sm:0 22px 60px rgba(0,0,0,.28)}
}
:root[data-theme="dark"]{color-scheme:dark;--bg:#0b0d13;--surface:#141720;--card:#141720;--surface-2:#181b25;--surface-3:#222633;--text:#cdd1df;--text-strong:#f5f6fb;--muted:#9399aa;--muted-2:#6e7486;--line:#282c38;--line-strong:#3a3f50;--accent:#8278ff;--accent-hover:#9a92ff;--accent-soft:#292653;--accent-ink:#fff;--signal:#ff8165;--good:#4ac6a5;--series-1:#8378ff;--series-2:#4bc9ac;--shadow-xs:0 8px 30px rgba(0,0,0,.16);--shadow-sm:0 22px 60px rgba(0,0,0,.28)}
body{background:var(--bg);background-image:radial-gradient(circle at 72% -10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 34%);font-family:Onest,Inter,"Segoe UI",system-ui,sans-serif}
.top{height:66px;padding:0 28px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(18px)}
.brand-sigil{color:var(--accent)} .sigil-cut{stroke:var(--text-strong)}
.wordmark span,.wordmark b{color:var(--text-strong)}
.top-actions{gap:9px}.site-jump,.job-indicator{padding:8px 11px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:13px}.job-indicator span{color:var(--accent)}
.account-menu{position:relative;padding:0;border:0}.account-menu summary{display:flex;align-items:center;gap:8px;padding:5px 9px;list-style:none;border:1px solid var(--line);border-radius:10px}
.account-avatar{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:var(--text-strong);color:var(--bg);font-size:10px}
.wrap{max-width:1220px;padding:36px 28px}.shell{max-width:1480px;grid-template-columns:220px minmax(0,1fr);gap:0;padding:0}.side{padding:28px 16px;border-right:1px solid var(--line);background:color-mix(in srgb,var(--surface) 45%,transparent)}.main{max-width:1240px;padding:36px 38px 70px}.side-site{border:0;border-radius:10px;background:var(--surface-2)}.side-nav a{border-radius:9px}.side-nav a.on{box-shadow:none;background:var(--accent-soft)}.side-nav a.on::after{display:none}
.page-head{padding:0;border:0}.page-head::before{display:none}.page-head h1{max-width:880px;font-size:clamp(32px,4vw,46px);letter-spacing:-.045em;line-height:1.06}.eyebrow{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.pulse-head{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:30px}.home-head h1{font-size:44px}.add-site{display:flex;gap:8px}.add-site input{width:190px}
.card,.kpi,.rec-list,.table,.connected,.side-site,.narrow{border-radius:14px;box-shadow:var(--shadow-xs)}.card{border-color:var(--line)}.card::after{display:none}.kpis{grid-template-columns:repeat(4,minmax(150px,1fr))}.kpi{border-top:1px solid var(--line);background:var(--surface)}.kpi:nth-child(2){grid-row:auto;min-height:116px;background:var(--surface);color:var(--text)}.kpi:nth-child(2) b,.kpi:nth-child(2) span{color:inherit}.kpi:nth-child(2) small{color:var(--muted)!important}.kpi:nth-child(2)::after{height:2px;background:transparent}.priority-card{border:1px solid var(--line)}
button,.btn,input,select,textarea{border-radius:9px}.btn,button.primary{box-shadow:none}.btn:hover,button.primary:hover{transform:translateY(-1px);box-shadow:0 10px 24px color-mix(in srgb,var(--accent) 25%,transparent)}
.site-stack{display:grid;gap:14px}.site-pulse{display:grid;grid-template-columns:1.1fr 110px 1fr 1.35fr 42px;gap:22px;align-items:center;padding:21px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow-xs)}.site-pulse.needs-action{border-color:color-mix(in srgb,var(--signal) 38%,var(--line))}.site-main{display:flex;align-items:center;gap:12px;color:var(--text)}.site-main:hover{text-decoration:none}.site-main h2{margin:0 0 3px;font-size:18px}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--good);box-shadow:0 0 0 5px color-mix(in srgb,var(--good) 12%,transparent)}.needs-action .status-dot{background:var(--signal);box-shadow:0 0 0 5px color-mix(in srgb,var(--signal) 12%,transparent)}
.health-wrap{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:11px}.health-ring{--score:0;width:62px;height:62px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(var(--good) calc(var(--score)*1%),var(--surface-3) 0)}.health-ring::before{content:"";grid-area:1/1;width:48px;height:48px;border-radius:50%;background:var(--surface)}.health-ring b{grid-area:1/1;z-index:1;color:var(--text-strong);font-size:19px}.engine-pulse{display:grid;gap:8px}.engine-pulse div{display:flex;justify-content:space-between;gap:8px;font-size:12px}.engine-pulse span,.engine-pulse a{color:var(--muted)}.engine-pulse .up{color:var(--good)}.engine-pulse .down{color:var(--err)}.site-next{display:grid;gap:4px}.site-next a,.site-next>a{display:grid;color:var(--text)}.site-next a:hover{text-decoration:none}.site-next span:not(.eyebrow){color:var(--muted);font-size:12px}.round-arrow{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:11px;color:var(--text)}.service-link{text-align:right;margin-top:18px;font-size:13px}
.overview-health{flex-direction:column}.overview-health .health-ring{width:78px;height:78px}.overview-health .health-ring::before{width:60px;height:60px}.hero-chart{padding:24px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--accent-soft) 28%,var(--surface)));box-shadow:var(--shadow-sm)}.hero-chart .chart-svg{min-height:270px}.next-best{display:grid;grid-template-columns:1.5fr .65fr;gap:28px;margin:18px 0 30px;padding:28px;border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));border-radius:16px;background:radial-gradient(circle at 85% 10%,color-mix(in srgb,var(--accent) 24%,transparent),transparent 45%),var(--surface);box-shadow:var(--shadow-sm)}.next-best h2{margin:7px 0;font-size:27px}.next-best p{color:var(--muted)}.next-best aside{display:grid;align-content:center;gap:5px;padding-left:24px;border-left:1px solid var(--line);font-size:13px}.next-best aside span{margin-bottom:8px;color:var(--muted)}.section-heading{margin:26px 0 12px}.change-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}.change-tiles a{display:grid;gap:5px;padding:17px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);box-shadow:var(--shadow-xs)}.change-tiles a:hover{text-decoration:none;border-color:var(--accent)}.change-tiles span,.change-tiles small{color:var(--muted)}.change-tiles b{font-size:28px}.section-heading{display:flex;align-items:center;justify-content:space-between}
.chart-svg .line{filter:drop-shadow(0 3px 4px color-mix(in srgb,var(--accent) 20%,transparent))}.chart-svg .grid{stroke:var(--line)}
@media(max-width:1000px){.site-pulse{grid-template-columns:1fr 100px 1fr}.site-next{grid-column:1/3}.round-arrow{grid-column:3;grid-row:2}.change-tiles{grid-template-columns:repeat(2,1fr)}.kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.top{padding:0 15px}.job-indicator,.site-jump{display:none}.shell{display:block}.main{padding:24px 16px 96px}.side{padding:0;border:0}.side-site{margin:14px 16px}.side-nav{background:color-mix(in srgb,var(--surface) 94%,transparent)}.next-best{grid-template-columns:1fr}.next-best aside{padding:18px 0 0;border-left:0;border-top:1px solid var(--line)}}
@media(max-width:680px){.wrap{padding:24px 14px}.pulse-head{align-items:stretch;flex-direction:column}.home-head h1{font-size:34px}.add-site input{width:100%;min-width:0}.add-site button{white-space:nowrap}.site-pulse{grid-template-columns:1fr auto;gap:16px}.health-wrap{grid-row:1}.engine-pulse,.site-next{grid-column:1/3}.round-arrow{grid-column:2;grid-row:3}.change-tiles{grid-template-columns:1fr 1fr;gap:8px}.next-best{padding:20px}.next-best h2{font-size:23px}.page-head h1{font-size:31px}.overview-health{align-items:center}.account-menu summary span:nth-child(2){display:none}.kpis{grid-template-columns:repeat(2,1fr)}}
.rel { display: inline-block; min-width: 34px; padding: 1px 6px; border-radius: 6px; font-weight: 600; cursor: help; }
.rel.hi { color: var(--accent); } .rel.mid { color: var(--p2); } .rel.lo { color: var(--muted); text-decoration: line-through; }

.score { display: inline-block; min-width: 32px; padding: 1px 6px; border-radius: 6px; font-weight: 700; border: 1px solid currentColor; }
.score.good { color: var(--accent); } .score.mid { color: var(--p2); } .score.bad { color: var(--err); }

/* --- графики (палитра проверена валидатором: light #2a78d6/#eb6834, dark #3987e5/#d95926) --- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; } }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .sw { margin-right: 0; }
.chart-plot { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .end { stroke: var(--card); stroke-width: 2; }
.chart-svg .endlabel { fill: var(--text); font-size: 12px; }
.chart-svg .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; top: -6px; pointer-events: none; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.18); white-space: nowrap; z-index: 2; }
.chart-tip div { color: var(--muted); }
.chart-tip b { color: var(--text); }
.chart-table { margin-top: 6px; }
.chart-table summary { color: var(--muted); }
.chart-empty { min-height: 150px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px; }
/* позиции: последовательная синяя шкала, ближе к топу — насыщеннее (в тёмной теме — ярче) */
:root { --pos-1: #104281; --pos-2: #256abf; --pos-3: #5598e7; --pos-4: #86b6ef; --pos-5: #b7d3f6; }
@media (prefers-color-scheme: dark) { :root { --pos-1: #b7d3f6; --pos-2: #86b6ef; --pos-3: #5598e7; --pos-4: #2a78d6; --pos-5: #1c5cab; } }
.pos-1 { background: var(--pos-1); color: #fff; } .pos-2 { background: var(--pos-2); color: #fff; }
.pos-3 { background: var(--pos-3); color: #0b1a2e; } .pos-4 { background: var(--pos-4); color: #0b1a2e; } .pos-5 { background: var(--pos-5); color: #0b1a2e; }
@media (prefers-color-scheme: dark) { .pos-1, .pos-2, .pos-3 { color: #0b1a2e; } .pos-4, .pos-5 { color: #fff; } }
.pos-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; margin: 10px 0; }
.pos-label { font-size: 14px; }
.pos-bar { display: flex; gap: 2px; height: 26px; }
.pos-bar .seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; min-width: 4px; cursor: default; }
.pos-bar .seg:first-child { border-radius: 4px 0 0 4px; } .pos-bar .seg:last-child { border-radius: 0 4px 4px 0; }
.pos-bar .seg:only-child { border-radius: 4px; }
.pos-legend { margin: 8px 0 0; }
.fun-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 40px; gap: 12px; align-items: center; margin: 8px 0; }
.fun-label { font-size: 14px; }
.fun-track { height: 14px; }
.fun-bar { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.fun-val { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .pos-row, .fun-row { grid-template-columns: 1fr; gap: 4px; } .fun-row { grid-template-columns: 1fr 40px; } .fun-track { grid-column: 1 / -1; order: 3; } }
.event-boxes { display: grid; gap: 6px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: auto; }
.sub-row { display: grid; gap: 6px; }
.sub-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.danger-link { color: var(--err); }

/* ========================================================================
   Nostatic UI v2 — product design layer
   ======================================================================== */
:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --card: var(--surface);
  --surface-2: #f8faf9;
  --surface-3: #eef3f0;
  --text: #17211b;
  --text-strong: #0d1711;
  --muted: #66736b;
  --muted-2: #89958e;
  --line: #dfe6e1;
  --line-strong: #cbd6cf;
  --accent: #315efb;
  --accent-hover: #2449d8;
  --accent-soft: #eaf0ff;
  --accent-ink: #ffffff;
  --err: #c33c37;
  --err-soft: #fbeceb;
  --warn-bg: #fff4df;
  --p0: #c33c37;
  --p1: #c56316;
  --p2: #8a6a09;
  --p3: #647169;
  --shadow-xs: 0 1px 2px rgba(15, 34, 23, .04);
  --shadow-sm: 0 5px 18px rgba(15, 34, 23, .06);
  --shadow-md: 0 16px 40px rgba(15, 34, 23, .10);
  --radius-sm: 7px;
  --radius: 11px;
  --radius-lg: 16px;
  --focus: 0 0 0 3px rgba(49, 94, 251, .22);
  --top-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c110e; --surface: #121915; --card: var(--surface); --surface-2: #17201b; --surface-3: #202b24;
    --text: #dce6df; --text-strong: #f3f8f5; --muted: #97a59c; --muted-2: #738178;
    --line: #293039; --line-strong: #3a4450; --accent: #7c9cff; --accent-hover: #9ab1ff;
    --accent-soft: #1d2a52; --accent-ink: #081027; --err: #ff8c86; --err-soft: #3b211f; --warn-bg: #392d17;
    --p0: #ff8c86; --p1: #ffad68; --p2: #e5c65e; --p3: #9baaa1;
    --shadow-xs: 0 1px 2px rgba(0,0,0,.2); --shadow-sm: 0 6px 20px rgba(0,0,0,.18); --shadow-md: 0 20px 50px rgba(0,0,0,.30);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c110e; --surface: #121915; --card: var(--surface); --surface-2: #17201b; --surface-3: #202b24;
  --text: #dce6df; --text-strong: #f3f8f5; --muted: #97a59c; --muted-2: #738178;
  --line: #293039; --line-strong: #3a4450; --accent: #7c9cff; --accent-hover: #9ab1ff;
  --accent-soft: #1d2a52; --accent-ink: #081027; --err: #ff8c86; --err-soft: #3b211f; --warn-bg: #392d17;
  --p0: #ff8c86; --p1: #ffad68; --p2: #e5c65e; --p3: #9baaa1;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.2); --shadow-sm: 0 6px 20px rgba(0,0,0,.18); --shadow-md: 0 20px 50px rgba(0,0,0,.30);
}

html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; letter-spacing: -.005em; }
::selection { background: var(--accent-soft); color: var(--text-strong); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); background: var(--surface); color: var(--text); padding: 9px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
.skip-link:focus { transform: none; }
h1, h2, h3, h4 { color: var(--text-strong); letter-spacing: -.025em; }
h1 { font-size: clamp(24px, 3vw, 30px); line-height: 1.18; font-weight: 720; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 680; }
h3 { font-size: 15px; }

.top { position: sticky; top: 0; z-index: 30; min-height: var(--top-h); padding: 0 24px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-color: var(--line); backdrop-filter: blur(14px); }
.brand { gap: 10px; font-size: 15px; letter-spacing: -.02em; }
.brand b { color: var(--accent); }
.brand-mark { width: 27px; height: 27px; display: inline-flex; align-items: end; gap: 2px; padding: 6px; border-radius: 8px; background: var(--accent); box-shadow: 0 4px 12px rgba(49,94,251,.24); }
.brand-mark span { flex: 1; display: block; background: var(--accent-ink); border-radius: 2px; }
.brand-mark span:nth-child(1) { height: 45%; } .brand-mark span:nth-child(2) { height: 80%; } .brand-mark span:nth-child(3) { height: 60%; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; background: transparent; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 1180px; padding: 28px 24px; }
.shell { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; max-width: 1440px; padding: 24px 32px 36px; }
.side { top: calc(var(--top-h) + 20px); }
.side-site { padding: 12px; border: 0; border-radius: var(--radius); background: transparent; margin-bottom: 14px; }
.side-site:hover { background: var(--surface-2); }
.side-site b { font-size: 14px; line-height: 1.35; }
.side-nav { gap: 3px; }
.side-nav a { min-height: 40px; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--muted); font-weight: 520; transition: color .15s, background .15s, transform .15s; }
.side-nav a:hover { color: var(--text); background: var(--surface-2); transform: translateX(2px); }
.side-nav a.on { color: var(--text-strong); background: var(--surface); box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line); font-weight: 650; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:first-child .nav-icon { fill: currentColor; stroke: none; }
.side-group { margin: 20px 11px 7px; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.mobile-more { display: none; }
.pill { background: var(--surface-3); color: var(--text); border: 0; font-weight: 650; }
.main { max-width: 1120px; width: 100%; }
.foot { border-top: 1px solid var(--line); padding: 22px; }

.page-head { margin: 0 0 24px; align-items: center; }
.page-head h1 { font-size: clamp(25px, 3vw, 31px); margin: 0; }
.page-head p { max-width: 760px; margin-top: 6px; }
.card { padding: 20px; border-color: var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); margin-bottom: 18px; }
.card-head { min-height: 30px; }
.card-head h2 { margin: 0; }
.grid { gap: 18px; margin-bottom: 18px; }
.grid > .card { box-shadow: var(--shadow-xs); }

button, .btn { min-height: 38px; border-radius: 9px; padding: 8px 14px; border-color: var(--line-strong); background: var(--surface); font-weight: 600; transition: transform .12s, border-color .12s, background .12s, box-shadow .12s; }
button:hover, .btn:hover { border-color: var(--muted-2); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-xs); }
button:active, .btn:active { transform: none; }
button.primary, .btn { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
button.primary:hover, .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button.link { min-height: auto; font-weight: 550; }
button.danger { background: var(--err-soft); }
input, select, textarea { min-height: 40px; background: var(--surface); border-color: var(--line-strong); border-radius: 9px; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
label { font-weight: 560; }
.inline { font-weight: 500; }

.kpis { grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { min-height: 116px; align-content: start; gap: 7px; padding: 16px 17px; border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: transparent; }
a.kpi:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
a.kpi:hover::after { background: var(--accent); }
.kpi span { font-size: 12px; font-weight: 620; letter-spacing: .01em; }
.kpi b { font-size: 27px; letter-spacing: -.035em; color: var(--text-strong); }
.kpi small { line-height: 1.35; }
.delta { border-radius: 5px; padding: 2px 5px; background: var(--surface-3); font-size: 11px !important; }
.delta.up { background: var(--accent-soft); } .delta.down { background: var(--err-soft); }

.rec-list { border-radius: 13px; overflow: hidden; box-shadow: var(--shadow-xs); }
.rec-row a { min-height: 74px; padding: 14px 16px; gap: 14px; transition: background .12s; }
.rec-row a:hover { background: var(--surface-2); }
.rec-title { color: var(--text-strong); font-size: 14px; }
.rec-sub i { font-style: normal; }
.rec-meta { align-items: center; }
.estimate { color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 5px; font-weight: 650; }
.priority-card { border-top: 3px solid var(--accent); }
.prio { min-width: 34px; padding: 4px 7px; border: 0; border-radius: 7px; background: var(--surface-3); }
.prio.P0 { background: var(--err-soft); } .prio.P1 { background: var(--warn-bg); }
.effort { border: 0; background: var(--surface-3); padding: 2px 7px; border-radius: 5px; font-weight: 650; }
.badge { padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 620; background: var(--surface-2); }
.st-confirmed { box-shadow: 0 0 0 4px var(--accent-soft); }
.rec-grid { grid-template-columns: minmax(0, 1.85fr) minmax(275px, .75fr); gap: 20px; }
.rec-grid > aside { position: sticky; top: calc(var(--top-h) + 20px); }

.tabs { gap: 2px; }
.tabs a { font-weight: 570; border-radius: 7px 7px 0 0; }
.tabs a.on { color: var(--accent); }
.chips { gap: 7px; }
.chip { padding: 4px 9px; border-style: solid; background: var(--surface); }
.chip.on { background: var(--accent-soft); font-weight: 620; }

.table { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
table { font-size: 13px; }
th, td { padding: 10px 12px; }
th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.kv { width: 100%; }
.kv td:first-child { width: 150px; }

.tiles { gap: 8px; }
.tile { min-height: 76px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); border-color: transparent; }
.tile b { font-size: 21px; color: var(--text-strong); }
.tile span { font-size: 12px; }
.note { border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-left: 3px solid var(--accent); background: var(--accent-soft); }
.ok, p.ok { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); border-radius: 10px; padding: 10px 13px; }
.err:not(span), p.err { border: 1px solid color-mix(in srgb, var(--err) 35%, var(--line)); background: var(--err-soft); border-radius: 10px; padding: 10px 13px; }
.empty { min-height: 150px; display: grid; align-content: center; justify-items: start; background: var(--surface-2); border-style: dashed; }
details { border-color: var(--line); }
summary { font-weight: 580; border-radius: 6px; }
summary:focus-visible { box-shadow: var(--focus); }
.progress { height: 10px; background: var(--surface-3); }
.progress div { border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--series-1)); }

.chart figcaption { margin-bottom: 16px; }
.chart-svg .grid { stroke: var(--line); }
.chart-tip { border-radius: 9px; box-shadow: var(--shadow-md); }
.fun-track { height: 9px; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.fun-bar { background: linear-gradient(90deg, var(--accent), var(--series-1)); border-radius: inherit; }
.pos-bar { height: 30px; }
.chart-table summary { margin-top: 10px; }

.connected { padding: 15px; border-radius: 11px; background: var(--surface-2); }
.event-boxes { gap: 8px; }
.check { padding: 8px 9px; border-radius: 8px; background: var(--surface-2); }
.check:has(input:checked) { background: var(--accent-soft); color: var(--text-strong); }
.check input { accent-color: var(--accent); }
.narrow { max-width: 440px; margin-top: 9vh; box-shadow: var(--shadow-md); }
.project { min-height: 170px; }
a.card.project:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.help { padding: clamp(20px, 4vw, 42px); }

@media (max-width: 1120px) {
  .kpis { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .shell { gap: 22px; padding-inline: 20px; }
}

@media (max-width: 900px) {
  body { padding-bottom: 76px; }
  .top { padding: 0 16px; }
  .shell { display: block; padding: 18px 16px 28px; }
  .side { position: static; }
  .side-site { margin: 0 0 14px; padding: 4px 2px; }
  .side-nav { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px; overflow: visible; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); backdrop-filter: blur(16px); }
  .side-nav a { min-width: 0; min-height: 54px; padding: 6px 3px; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: 10px; line-height: 1.1; white-space: normal; text-align: center; border: 0; }
  .side-nav a:hover { transform: none; }
  .side-nav a.on { box-shadow: none; background: var(--accent-soft); color: var(--accent); }
  .side-nav .pill, .side-nav .dot-ok, .side-nav .dot-warn, .side-nav .dot-off { display: none; }
  .side-nav .settings-link, .side-group { display: none; }
  .side-nav > a:nth-of-type(5) { display: none; }
  .mobile-more { display: block; position: static; border: 0; padding: 0; }
  .mobile-more summary { min-height: 54px; padding: 6px 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; list-style: none; font-size: 10px; line-height: 1.1; color: var(--muted); }
  .mobile-more summary::-webkit-details-marker { display: none; }
  .mobile-menu { position: absolute; right: 0; bottom: 66px; width: min(250px, calc(100vw - 20px)); padding: 8px; display: grid; gap: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-md); }
  .mobile-menu a { min-height: 42px; padding: 10px 12px; display: block; font-size: 13px; text-align: left; }
  .nav-icon { width: 19px; height: 19px; flex-basis: 19px; }
  .main { max-width: none; }
  .rec-grid > aside { position: static; }
  .foot { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 18px 14px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .card { padding: 16px; border-radius: 13px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 104px; padding: 14px; }
  .kpi b { font-size: 23px; }
  .rec-row a { grid-template-columns: auto minmax(0, 1fr); padding: 13px; }
  .rec-meta { grid-column: 2; flex-wrap: wrap; gap: 7px; white-space: normal; }
  .grid.two { grid-template-columns: 1fr; }
  .top .link { padding-inline: 4px; }
}

@media (max-width: 420px) {
  .brand > span:last-child { font-size: 0; }
  .brand > span:last-child b { font-size: 14px; }
  
  .shell { padding-inline: 12px; }
  .kpis { gap: 8px; }
  .kpi { min-height: 100px; }
  .kpi span { font-size: 11px; }
  .kpi b { font-size: 21px; }
  .page-head form, .page-head .row { width: 100%; }
  .page-head button { flex: 1; }
  th, td { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* --- Identity v2.1: поисковая лаборатория, а не типовой SaaS ----------- */
:root {
  --bg: #f3f4f7;
  --surface-2: #f7f8fa;
  --surface-3: #e9ecf2;
  --text: #242735;
  --text-strong: #11131b;
  --muted: #6f7382;
  --muted-2: #9498a6;
  --line: #d9dce4;
  --line-strong: #c4c8d2;
  --accent: #3d45ff;
  --accent-hover: #252dda;
  --accent-soft: #e9eaff;
  --signal: #ff6634;
  --radius: 4px;
  --radius-lg: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c12; --surface: #12141c; --card: var(--surface); --surface-2: #171923; --surface-3: #212431;
    --text: #d9dce7; --text-strong: #f5f6fb; --muted: #9297a8; --muted-2: #6f7485;
    --line: #292c38; --line-strong: #3b3f4e; --accent: #858aff; --accent-hover: #a2a6ff;
    --accent-soft: #252851; --accent-ink: #0b0c1a; --signal: #ff7a4e;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c12; --surface: #12141c; --card: var(--surface); --surface-2: #171923; --surface-3: #212431;
  --text: #d9dce7; --text-strong: #f5f6fb; --muted: #9297a8; --muted-2: #6f7485;
  --line: #292c38; --line-strong: #3b3f4e; --accent: #858aff; --accent-hover: #a2a6ff;
  --accent-soft: #252851; --accent-ink: #0b0c1a; --signal: #ff7a4e;
}
body {
  background-color: var(--bg);
  background-image: linear-gradient(to right, color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px);
  background-size: 72px 100%;
}
.top { border-bottom: 1px solid var(--text-strong); }
.brand { gap: 9px; }
.brand-sigil { width: 31px; height: 31px; display: grid; place-items: center; color: var(--accent); }
.brand-sigil svg { width: 31px; height: 31px; overflow: visible; }
.sigil-orbit { fill: none; stroke: currentColor; stroke-width: 1.7; }
.sigil-cut { fill: none; stroke: var(--text-strong); stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: bevel; }
.brand-sigil circle { fill: var(--signal); }
.wordmark { display: flex; align-items: baseline; gap: 3px; font-weight: 760; font-size: 15px; letter-spacing: -.04em; }
.wordmark span { color: var(--text-strong); }
.wordmark b { color: var(--accent); font: 750 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.shell { grid-template-columns: 202px minmax(0, 1fr); }
.side-site { border-left: 2px solid var(--text-strong); border-radius: 0; }
.side-nav a { border-radius: 2px; }
.side-nav a.on { box-shadow: inset 3px 0 0 var(--accent); border-color: transparent; background: transparent; }
.side-nav a.on::after { content: "•"; margin-left: auto; color: var(--signal); font-size: 18px; line-height: 0; }
.side-nav a.on .pill { margin-left: 0; }
.page-head { position: relative; padding: 11px 0 18px 18px; border-left: 4px solid var(--accent); }
.page-head::before { content: "OL / SEARCH INTELLIGENCE"; display: block; flex: 0 0 100%; margin-bottom: -10px; color: var(--muted); font: 650 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .15em; }
.page-head h1 { font-size: clamp(29px, 3.2vw, 40px); letter-spacing: -.055em; }
.card, .kpi, .rec-list, .table, .connected, .side-site, .narrow {
  border-radius: 3px;
  box-shadow: none;
}
.card { position: relative; }
.card::after { content: ""; position: absolute; right: -1px; top: -1px; width: 10px; height: 10px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); pointer-events: none; }
.grid.two > .card:nth-child(even)::after { border-color: var(--signal); }
.kpis { grid-template-columns: 1.15fr 1.15fr repeat(3, 1fr); }
.kpi { border-top: 2px solid var(--text-strong); }
.kpi:nth-child(2) { grid-row: span 2; min-height: 172px; background: var(--text-strong); color: var(--bg); }
.kpi:nth-child(2) b, .kpi:nth-child(2) span { color: var(--bg); }
.kpi:nth-child(2) small { color: color-mix(in srgb, var(--bg) 65%, transparent) !important; }
.kpi:nth-child(2)::after { background: var(--signal); height: 5px; }
.kpi b, .tile b, .num { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.priority-card { border-top: 0; border-left: 4px solid var(--accent); }
.priority-card::after { border-color: var(--signal); }
.prio, .badge, .chip, .effort, .score { border-radius: 2px; }
.rec-row a { border-left: 3px solid transparent; }
.rec-row a:hover { border-left-color: var(--accent); }
button, .btn, input, select, textarea { border-radius: 2px; }
button.primary, .btn { box-shadow: 3px 3px 0 var(--text-strong); }
button.primary:hover, .btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--text-strong); }
.tabs a { border-radius: 0; }
.fun-bar { background: var(--accent); }
.progress div { background: repeating-linear-gradient(135deg, var(--accent) 0 8px, var(--series-1) 8px 16px); }
@media (max-width: 1120px) { .kpis { grid-template-columns: repeat(3, minmax(150px, 1fr)); } }
@media (max-width: 720px) {
  body { background-size: 44px 100%; }
  .page-head { padding-left: 13px; }
  .page-head h1 { font-size: 30px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { grid-row: auto; min-height: 104px; }
}
.chart-svg .marker { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .7; }
.chart-svg .marker-label { fill: var(--text); font-size: 11px; font-weight: 600; }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--accent); flex: none; }
.stack label.check, label.check { display: flex; gap: 8px; align-items: center; }
.check .chip { font-size: 11px; padding: 0 6px; }
@media (max-width: 900px) {
  .rec-grid { grid-template-columns: minmax(0, 1fr); }
  .side-nav a.on { box-shadow: none; background: var(--accent-soft); }
  .side-nav a.on::after { display: none; }
}

/* v3 wins over the retired v2.1 experiment above. */
:root{--bg:#f4f5fa;--surface:#fff;--card:#fff;--surface-2:#f7f8fc;--surface-3:#eceef6;--text:#303447;--text-strong:#121522;--muted:#70768a;--muted-2:#9ba0b1;--line:#e1e4ed;--line-strong:#cfd3df;--accent:#6657f5;--accent-hover:#5143df;--accent-soft:#eeecff;--accent-ink:#fff;--signal:#f07354;--series-1:#6f61ff;--series-2:#20ad92;--radius:14px;--radius-lg:16px}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#0b0d13;--surface:#141720;--card:#141720;--surface-2:#181b25;--surface-3:#222633;--text:#cdd1df;--text-strong:#f5f6fb;--muted:#9399aa;--muted-2:#6e7486;--line:#282c38;--line-strong:#3a3f50;--accent:#8278ff;--accent-hover:#9a92ff;--accent-soft:#292653;--accent-ink:#fff;--signal:#ff8165;--series-1:#8378ff;--series-2:#4bc9ac}}
:root[data-theme="dark"]{--bg:#0b0d13;--surface:#141720;--card:#141720;--surface-2:#181b25;--surface-3:#222633;--text:#cdd1df;--text-strong:#f5f6fb;--muted:#9399aa;--muted-2:#6e7486;--line:#282c38;--line-strong:#3a3f50;--accent:#8278ff;--accent-hover:#9a92ff;--accent-soft:#292653;--accent-ink:#fff;--signal:#ff8165;--series-1:#8378ff;--series-2:#4bc9ac}
body{background-color:var(--bg);background-image:radial-gradient(circle at 72% -10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 34%)}
.top{border-bottom-color:var(--line)}.wordmark b{color:var(--accent)}
.side-site{border-left:0;border-radius:10px}.side-nav a{border-radius:9px}.side-nav a.on{box-shadow:none;background:var(--accent-soft)}.side-nav a.on::after{display:none}
.page-head{padding:0;border-left:0}.page-head::before{content:none;display:none}.page-head h1{font-size:clamp(32px,4vw,46px)}
.card,.kpi,.rec-list,.table,.connected,.side-site,.narrow{border-radius:14px}.card::after{display:none}.kpi{border-top:1px solid var(--line)}
.kpi:nth-child(2){grid-row:auto;min-height:116px;background:var(--surface);color:var(--text)}.kpi:nth-child(2) b,.kpi:nth-child(2) span{color:inherit}.kpi:nth-child(2) small{color:var(--muted)!important}.kpi:nth-child(2)::after{background:transparent;height:2px}
.priority-card{border:1px solid var(--line)}button,.btn,input,select,textarea{border-radius:9px}.btn,button.primary{box-shadow:none}
/* Шапка: переключатель сайтов, меню аккаунта, индикатор заданий */
.site-switch,.account-menu{position:relative;padding:0;border:0;background:none}
.site-switch summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px}
.site-switch summary::-webkit-details-marker,.account-menu summary::-webkit-details-marker{display:none}
.account-menu summary{cursor:pointer}
.menu-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:50;min-width:220px;max-height:60vh;overflow:auto;display:grid;gap:2px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-md)}
.site-switch .menu-pop{left:0;right:auto}
.menu-pop a,.menu-pop button{display:block;width:100%;padding:9px 11px;border-radius:8px;color:var(--text);text-align:left;font-size:13px;text-decoration:none;min-height:0;border:0;background:none;box-shadow:none;transform:none}
.menu-pop a:hover,.menu-pop button:hover{background:var(--surface-2)}
.menu-pop a.on{color:var(--accent);font-weight:650}
.job-indicator.busy{color:var(--text-strong);border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}
.job-indicator.busy span{animation:job-pulse 1.2s ease-in-out infinite}
@keyframes job-pulse{50%{opacity:.25}}
.prio{white-space:nowrap}
/* Разделы проекта — горизонтальными вкладками под шапкой: вся ширина отдана содержимому. Телефон — нижнее меню, как было. */
@media (min-width: 901px) {
  .shell { display: block; max-width: 1320px; margin: 0 auto; padding: 0 32px 40px; }
  .side { position: sticky; top: var(--top-h); z-index: 20; padding: 0; margin: 0 -32px 28px; border: 0; border-bottom: 1px solid var(--line);
          background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); }
  .side-site { display: none; }
  .side-nav { display: flex; align-items: center; gap: 4px; padding: 0 32px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { position: relative; flex: none; min-height: 50px; padding: 0 12px; gap: 8px; border-radius: 0; background: none !important;
                box-shadow: none !important; color: var(--muted); white-space: nowrap; transform: none !important; }
  .side-nav a:hover { color: var(--text-strong); }
  .side-nav a.on { color: var(--text-strong); font-weight: 650; }
  .side-nav a.on::after { content: ""; display: block; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; margin: 0;
                          border-radius: 2px; background: var(--accent); }
  .side-nav .nav-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .side-group { flex: none; margin: 0 8px 0 auto; width: 1px; height: 22px; background: var(--line); font-size: 0; overflow: hidden; }
  .main { max-width: none; padding: 0; }
}
/* --- Экраны v3: общие элементы ------------------------------------------- */
.change-tiles a.on{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.filter-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 18px}
.filter-bar .chips{margin:0}
.filter-bar a.on{font-weight:650}
.prio-group{margin-bottom:22px}
.prio-head{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-size:15px}
.prio-group .rec-row a{grid-template-columns:minmax(0,1fr) auto}
.rec-main{display:grid;gap:4px;min-width:0}
.rec-sub{font-size:13px;line-height:1.45}
.rec-tags{display:flex;flex-wrap:wrap;gap:6px}
.tag{display:inline-block;padding:2px 8px;border-radius:6px;background:var(--surface-3);color:var(--muted);font-size:11px;font-weight:600}
.tag.st-confirmed{background:color-mix(in srgb,var(--good) 16%,transparent);color:var(--good)}
.tag.st-not_confirmed{background:var(--err-soft);color:var(--err)}
.tag.st-done,.tag.st-accepted,.tag.st-in_progress{background:var(--accent-soft);color:var(--accent)}
.rec-meta{display:flex;align-items:center;gap:10px;white-space:nowrap}
.legend-note{max-width:820px}
@media (max-width:720px){.filter-bar{flex-direction:column;align-items:flex-start}.prio-group .rec-row a{grid-template-columns:1fr}.rec-meta{flex-wrap:wrap}}
.back-link{margin:0 0 14px;font-size:13px}
.rec-head{margin-bottom:6px}
.rec-head h1{font-size:clamp(28px,3.4vw,40px)}
.rec-head .lead{max-width:860px;font-size:16px}
.rec-hero{margin-top:12px}
.hero-fix{margin:8px 0 18px;font-size:19px;line-height:1.45;color:var(--text-strong);max-width:760px}
.rec-grid{margin-top:4px}
.change-tiles .tile-static{display:grid;gap:5px;padding:17px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-xs)}
.change-tiles .tile-static span,.change-tiles .tile-static small{color:var(--muted)}
.change-tiles .tile-static b{font-size:28px;color:var(--text-strong)}
/* Знак: «no» акцентом — никакой статики */
.wordmark{gap:0;font-size:17px;font-weight:760;letter-spacing:-.035em}
.wordmark b{font:inherit;letter-spacing:inherit;text-transform:none;color:var(--accent)!important}
.wordmark span{color:var(--text-strong)}
.run-meta{padding:14px 18px}
.run-meta-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.run-meta-row p{margin:0;max-width:700px}
.sev-head{scroll-margin-top:130px}
.login-card{max-width:460px;padding:34px}
.login-card h1{font-size:32px;letter-spacing:-.04em;margin:8px 0 4px}
.kpis.kpis-3{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:680px){.kpis.kpis-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
.event-boxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.event-boxes .check{padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);font-weight:520}
.event-boxes .check:has(input:checked){background:color-mix(in srgb,var(--accent-soft) 45%,var(--surface));border-color:color-mix(in srgb,var(--accent) 35%,var(--line))}
@media(max-width:680px){.event-boxes{grid-template-columns:1fr}}
@media (max-width:420px){.brand > span.wordmark{font-size:16px}.brand > span.wordmark span,.brand > span.wordmark b{font-size:16px}}
/* --- Логотип: слово nostatic, точка над i в движении ------------------ */
.brand{gap:0;text-decoration:none}
.brand:hover{text-decoration:none}
.logo{display:inline-flex;white-space:nowrap;font-family:Onest,Inter,"Segoe UI",system-ui,sans-serif;font-weight:760;font-size:23px;line-height:1;letter-spacing:-.045em;color:var(--text-strong)}
.logo-i{position:relative;display:inline-block;color:var(--accent)}
.logo-dot{position:absolute;left:50%;top:-.07em;width:.24em;height:.24em;margin-left:-.09em;border-radius:50%;background:var(--signal);
  box-shadow:-.3em .05em 0 -.045em color-mix(in srgb,var(--signal) 55%,transparent),-.55em .12em 0 -.075em color-mix(in srgb,var(--signal) 28%,transparent);
  animation:logo-fly .9s cubic-bezier(.2,.8,.25,1.15) .15s both}
@keyframes logo-fly{0%{transform:translate(-.9em,.55em);opacity:0}60%{opacity:1}100%{transform:none}}
.brand:hover .logo-dot{animation:logo-hop .5s ease-out}
@keyframes logo-hop{40%{transform:translate(.06em,-.14em)}100%{transform:none}}
.pub-foot .logo{font-size:21px}
@media (prefers-reduced-motion:reduce){.logo-dot{animation:none}}
@media (max-width:420px){.brand>.logo{font-size:21px}}

/* Анализ одной карточки маркетплейса — те же поверхности и акцент, что в кабинете. */
.market-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:-7px 0 24px;padding:16px 20px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:14px;background:linear-gradient(110deg,var(--accent-soft),var(--surface));color:var(--text-strong)}
.market-entry:hover{text-decoration:none;border-color:var(--accent)}.market-entry span:first-child{display:grid;gap:3px}.market-entry small{color:var(--muted)}.market-entry span:last-child{color:var(--accent);font-size:22px}
.market-head{margin-bottom:24px}.market-head p{max-width:760px}
.market-form{display:grid;gap:16px;max-width:1080px}.market-form .card{margin:0}
.market-input>label,.market-queries>label{display:block;margin-bottom:8px;font-weight:700}
.market-url-row{display:flex;gap:10px}.market-url-row input{min-width:0;flex:1}.market-url-row select{width:210px;max-width:100%}
.market-availability{margin:13px 0 0}
.market-queries textarea{width:100%;font-family:inherit;font-size:14px}
.market-error{margin:18px 0;padding:18px 20px;border:1px solid var(--err);border-radius:13px;background:var(--err-soft)}.market-error p{margin:5px 0}
.market-result{margin:28px 0;max-width:1080px}.market-result-head{margin-bottom:18px}.market-result-head h2{margin:5px 0;font-size:27px;overflow-wrap:anywhere}
.market-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:24px}
.market-facts>div{display:grid;gap:5px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.market-facts span{color:var(--muted);font-size:12px}.market-facts b{overflow-wrap:anywhere}
.market-findings{display:grid;gap:9px;margin:12px 0;padding:0;list-style:none}
.market-finding{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.market-level{color:var(--accent);font-size:12px;font-weight:700;text-transform:uppercase}
.market-finding b{display:block;margin-bottom:4px}.market-finding p{margin:0;color:var(--muted)}
@media(max-width:760px){.market-url-row{flex-wrap:wrap}.market-url-row input{flex-basis:100%}.market-url-row select,.market-url-row button{flex:1}.market-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.market-url-row{display:grid}.market-url-row select,.market-url-row button{width:100%}.market-finding{grid-template-columns:1fr}.market-facts{gap:7px}.market-facts>div{padding:12px}}
