@font-face {
  font-family:'Onest';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('/static/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family:'Onest';
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url('/static/fonts/onest-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family:'Unbounded';
  font-style:normal;
  font-weight:600 800;
  font-display:swap;
  src:url('/static/fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family:'Unbounded';
  font-style:normal;
  font-weight:600 800;
  font-display:swap;
  src:url('/static/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg:#FAF6F0;
  --panel:#FFFFFF;
  --sunken:#F1EAE0;
  --ink:#1A1714;
  --ink-soft:#4B453B;
  --muted:#6B6356;
  --faint:#6B6356;
  --line:#E6DED2;
  --line-strong:#D2C8B9;
  --brand:#F24E2E;
  --brand-d:#D43C1F;
  --brand-action-hover:#B72F18;
  --brand-tint:#FCE5DE;
  --brand-ink:#7A2412;
  --ok:#217A51;
  --ok-bg:#E2F2E9;
  --warn:#8A5B0E;
  --warn-bg:#FAEBCB;
  --attention-bg:#FFFBF3;
  --attention-line:#D7A13E;
  --attention-ink:#745018;
  /* Status colours: red — overdue or urgent, amber — waiting for approval, green — done. */
  --overdue-bg:#FDF4F2;
  --approval-bg:#FFF8EC;
  --approval-line:#D7A13E;
  --approval-ink:#745018;
  --err:#A72C1C;
  --err-bg:#F9E3DE;
  --info:#466471;
  --info-bg:#E5EFF1;
  --dark:#14110E;
  --chart-primary:#D43C1F;
  --chart-teal:#25796F;
  --chart-blue:#315F8C;
  --chart-gold:#A86F00;
  --chart-neutral:#7A7064;
  --chart-surface:#FCFAF7;
  --font-ui:'Onest',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-display:'Unbounded',system-ui,sans-serif;
  --shadow-panel:0 6px 20px -6px rgba(26,23,20,.12);
  --shadow-accent:0 10px 28px -8px rgba(242,78,46,.32);
  --ease:cubic-bezier(.22,1,.36,1);
  --shell-width:clamp(1380px,84vw,2200px);
  --type-service-title:clamp(30px,2.65vw,40px);
  --type-service-description:17px;
  --service-hero-padding:32px;
  --service-hero-radius:18px;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; scrollbar-gutter:stable; }
body {
  margin:0;
  min-width:320px;
  font-family:var(--font-ui);
  background:var(--bg);
  color:var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
button,input,select,textarea { font:inherit; }
button,input,select,textarea,summary,a { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid var(--brand); outline-offset:3px; }

header {
  position:sticky;
  top:0;
  z-index:20;
  background:var(--dark);
  color:#F3ECE2;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.header-inner {
  width:var(--shell-width);
  max-width:100%;
  min-height:60px;
  margin:0 auto;
  padding:9px 28px;
  display:flex;
  align-items:center;
  gap:16px;
}
.wordmark {
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
  font-family:var(--font-display);
  font-size:17px;
  font-weight:800;
  letter-spacing:-.035em;
}
.spark { width:.31em; height:.31em; margin-left:.14em; border-radius:50%; background:var(--brand); }
.mode-switch {
  display:flex;
  gap:2px;
  margin-left:auto;
  padding:0;
  border:0;
  background:transparent;
}
.mode-switch button {
  min-height:32px;
  padding:5px 13px;
  border:0;
  background:transparent;
  color:#CFC5B8;
  font-size:12px;
}
.mode-switch button:hover { background:rgba(255,255,255,.08); }
.mode-switch button.active { background:#F3ECE2; color:var(--dark); }
.business-unit-switch {
  display:flex;
  gap:2px;
  margin-left:auto;
  padding:3px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
}
.business-unit-switch button {
  min-height:30px;
  padding:4px 12px;
  border:0;
  background:transparent;
  color:#CFC5B8;
  font-size:12px;
}
.business-unit-switch button:hover { background:rgba(255,255,255,.08); }
.business-unit-switch button.active { background:#F3ECE2; color:var(--dark); }

.wrap { width:var(--shell-width); max-width:100%; margin:0 auto; padding:28px; }
.panel {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
  margin-bottom:20px;
  box-shadow:var(--shadow-panel);
}
.panel h2 { margin:0; font-size:20px; line-height:1.25; letter-spacing:-.015em; }
.panel-intro { margin:7px 0 20px; max-width:68ch; color:var(--muted); font-size:14px; }
/* Section label above every page title: one look on light and dark surfaces. */
.eyebrow { display:block; margin:0 0 8px; color:var(--muted); font-size:11px; font-weight:700; line-height:1.3; letter-spacing:.12em; text-transform:uppercase; }
.service-hero .eyebrow { color:#F78A71; }
/* Standard first block for every service page. */
.service-hero {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:320px;
  padding:var(--service-hero-padding);
  border-color:var(--dark);
  border-radius:var(--service-hero-radius);
  background:var(--dark);
  color:#F8F1E8;
}
.service-hero::before {
  content:"";
  position:absolute;
  z-index:-1;
  top:-132px;
  right:-76px;
  width:390px;
  height:390px;
  border:1px solid rgba(242,78,46,.42);
  border-radius:50%;
  box-shadow:0 0 0 54px rgba(242,78,46,.09),0 0 0 108px rgba(242,78,46,.035);
  pointer-events:none;
}
.service-hero h1,.service-hero .start-heading h2 {
  max-width:860px;
  margin:0;
  font-family:var(--font-display);
  font-size:var(--type-service-title);
  line-height:1.08;
  letter-spacing:-.045em;
  overflow-wrap:anywhere;
}
.service-hero .service-hero-description,.service-hero > p,.service-hero .start-heading .panel-intro {
  max-width:850px;
  margin:14px 0 24px;
  color:#CFC5B8;
  font-size:var(--type-service-description);
  line-height:1.5;
}
.service-hero label { color:#E8DED1; }
.service-hero input,.service-hero input[type=text],.service-hero input[type=number],.service-hero select,.service-hero textarea { border-color:#5A5046; background:#241F1A; color:#fff; }
.service-hero input::placeholder,.service-hero textarea::placeholder { color:#AFA396; }
.service-hero .adv { border-top-color:rgba(255,255,255,.14); }
.service-hero .adv summary { color:#D8CEC1; }
.service-hero .adv summary:hover { color:#fff; }
.service-hero .grid-start { max-width:100%; }
.start-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; }
.start-heading > div,.grid-start > div { min-width:0; }

label { display:block; font-size:13px; font-weight:600; color:var(--ink-soft); margin-bottom:7px; }
.label-like { display:block; margin-bottom:7px; color:var(--ink-soft); font-size:13px; font-weight:600; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
  width:100%;
  min-height:46px;
  padding:10px 13px;
  border:1px solid var(--line-strong);
  border-radius:12px;
  font-size:14px;
  background:#fff;
  color:var(--ink);
  transition:border-color 180ms var(--ease),box-shadow 180ms var(--ease),background 180ms var(--ease);
}
input::placeholder,textarea::placeholder { color:#746B5E; opacity:1; }
input:hover,select:hover,textarea:hover { border-color:#A69A8A; }
input:focus,select:focus,textarea:focus {
  border-color:var(--brand);
  box-shadow:0 0 0 4px rgba(242,78,46,.16);
  outline:none;
}
textarea { resize:vertical; min-height:76px; font-family:inherit; }
.row { display:flex; gap:16px; flex-wrap:wrap; }
.row > div { flex:1; min-width:120px; }
.grid-start { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:end; }
.adv { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.adv summary {
  width:max-content;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  color:var(--brand-ink);
}
.adv summary:hover { color:var(--brand-d); }
.adv .row { margin-top:16px; }
.checks { display:flex; gap:18px; flex-wrap:wrap; margin-top:12px; }
.checks label { display:flex; align-items:center; gap:6px; color:var(--ink); font-size:13px; margin:0; cursor:pointer; }
.service-hero .checks label { color:#E8DED1; }
input[type=checkbox] { width:17px; height:17px; accent-color:var(--brand); }
button {
  min-height:42px;
  cursor:pointer;
  border:1px solid transparent;
  border-radius:999px;
  padding:9px 18px;
  background:var(--brand-d);
  color:#fff;
  font-weight:650;
  font-size:14px;
  transition:background 180ms var(--ease),border-color 180ms var(--ease),transform 140ms var(--ease);
}
button:hover { background:var(--brand-action-hover); }
button:active { transform:scale(.98); }
button.ghost { background:#fff; border-color:var(--line-strong); color:var(--ink); }
button.ghost:hover { background:var(--sunken); border-color:#B7AA98; }
button.danger { min-height:30px; padding:4px 11px; background:transparent; border-color:transparent; color:var(--err); }
button.danger:hover { background:var(--err-bg); }
button:disabled { opacity:.48; cursor:not-allowed; transform:none; }
#startBtn { min-height:46px; padding-inline:22px; box-shadow:var(--shadow-accent); }

.crawls { display:flex; flex-direction:column; gap:8px; }
.crawl-item {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:58px;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  cursor:pointer;
  transition:background 180ms var(--ease);
}
.crawl-item:last-child { border-bottom:0; }
.crawl-item:hover { background:var(--sunken); }
.crawl-item .host { font-weight:650; overflow-wrap:anywhere; }
.crawl-item .meta { color:var(--muted); font-size:12px; margin-left:auto; text-align:right; }
.badge { display:inline-flex; align-items:center; min-height:24px; font-size:11px; padding:3px 9px; border-radius:999px; font-weight:650; white-space:nowrap; }
.b-running { background:var(--brand-tint); color:var(--brand-ink); }
.b-done { background:var(--ok-bg); color:var(--ok); }
.b-error { background:var(--err-bg); color:var(--err); }
.b-stopped { background:var(--sunken); color:var(--muted); }
.progress { height:8px; background:var(--sunken); border-radius:999px; overflow:hidden; margin:14px 0 9px; }
.progress .bar { height:100%; background:var(--brand); width:0%; border-radius:999px; transition:width .4s var(--ease); }

.cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--sunken);
}
.card { min-height:88px; padding:15px 12px; text-align:left; border-right:1px solid var(--line); }
.card:last-child { border-right:0; }
.card .num { font-size:24px; line-height:1.1; font-weight:750; font-variant-numeric:tabular-nums; }
.card .lbl { font-size:12px; color:var(--muted); margin-top:7px; line-height:1.3; }

.tabs {
  display:flex;
  gap:2px;
  overflow-x:auto;
  border-bottom:1px solid var(--line);
  margin:18px 0;
  scrollbar-width:thin;
}
.tabs button {
  flex:0 0 auto;
  min-height:40px;
  background:none;
  color:var(--muted);
  border:0;
  border-radius:0;
  padding:9px 13px;
  font-weight:650;
  border-bottom:3px solid transparent;
}
.tabs button:hover { background:var(--sunken); color:var(--ink); }
.tabs button.active { color:var(--brand-d); border-bottom-color:var(--brand); }
.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.toolbar input, .toolbar select { width:auto; }
.toolbar .search { min-width:240px; }
table.data { width:100%; border-collapse:separate; border-spacing:0; font-size:13px; font-variant-numeric:tabular-nums; }
table.data th, table.data td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
table.data th { color:var(--muted); font-weight:650; white-space:nowrap; position:sticky; top:0; z-index:2; background:var(--sunken); }
table.data tbody tr:hover td { background:#FFF9F6; }
table.data td.url { max-width:420px; word-break:break-word; }
table.data a { color:var(--brand-ink); text-decoration:underline; text-decoration-color:var(--line-strong); text-underline-offset:3px; }
table.data a:hover { text-decoration:underline; }
.tablewrap { overflow:auto; max-height:62vh; border:1px solid var(--line); border-radius:12px; background:#fff; }
#auditContent .tablewrap { max-height:none; }
.sc { font-weight:700; }
.sc-2 { color:var(--ok); } .sc-3 { color:var(--info); } .sc-4 { color:var(--err); } .sc-5 { color:var(--err); } .sc-0 { color:var(--muted); }
.pager { display:flex; gap:10px; align-items:center; margin-top:10px; font-size:13px; color:var(--muted); }
.issue-cat { margin-bottom:6px; }
.issue-cat h4 { margin:18px 0 8px; font-size:13px; color:var(--muted); }
.issue-row {
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  border-bottom:1px solid var(--line);
  cursor:pointer;
  transition:background 180ms var(--ease);
}
.issue-row:hover { background:var(--sunken); }
.issue-row.zero { opacity:.5; cursor:default; }
.issue-row .cnt { margin-left:auto; font-weight:700; }
.dot { width:9px; height:9px; border-radius:50%; }
.d-high { background:var(--err); } .d-warning { background:var(--warn); } .d-info { background:var(--info); }
.muted { color:var(--muted); }
/* Компонентные правила с display объявлены ниже и не должны перебивать скрытие. */
.hidden { display:none !important; }
.exports { display:flex; gap:8px; flex-wrap:wrap; margin-left:auto; }
.err-box { background:var(--err-bg); color:var(--err); padding:11px 13px; border-radius:12px; font-size:13px; }
.loading { display:grid; gap:9px; padding:8px 0; }
.loading span { display:block; height:12px; border-radius:999px; background:var(--sunken); }
.loading span:nth-child(1) { width:42%; }
.loading span:nth-child(2) { width:76%; }
.loading span:nth-child(3) { width:61%; }
.audit-hero {
  min-height:320px;
}
.audit-hero::after {
  content:none;
}
.audit-form {
  display:grid;
  grid-template-columns:minmax(240px,1.35fr) minmax(180px,.75fr) auto;
  gap:12px;
  align-items:end;
  max-width:820px;
}
.audit-hero button { min-height:46px; box-shadow:var(--shadow-accent); }
.audit-callout {
  margin-top:14px;
  max-width:94ch;
  color:#BEB2A4;
  font-size:12px;
}
.audit-settings {
  max-width:820px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.14);
}
.audit-settings summary {
  width:max-content;
  cursor:pointer;
  color:#D8CEC1;
  font-size:12px;
  font-weight:650;
}
.audit-settings summary:hover { color:#fff; }
.audit-settings-grid {
  display:grid;
  grid-template-columns:minmax(160px,.7fr) minmax(240px,1.3fr);
  gap:12px;
  margin-top:13px;
}
.competitor-research-note { margin:0; padding:10px 14px; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.competitor-research-note strong { display:inline; color:var(--ink); font-size:12px; }
.project-profile {
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--sunken);
  overflow:hidden;
}
.project-profile-head {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.project-profile-head strong { font-size:14px; }
.project-profile-head button { margin-left:auto; }
.profile-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.profile-fact {
  min-width:0;
  padding:12px 14px;
  border-right:1px solid var(--line);
}
.profile-fact:last-child { border-right:0; }
.profile-fact dt { color:var(--muted); font-size:11px; font-weight:650; }
.profile-fact dd { margin:4px 0 0; font-size:13px; font-weight:650; overflow-wrap:anywhere; }
.profile-summary { margin:0; padding:12px 14px; border-top:1px solid var(--line); color:var(--ink-soft); font-size:13px; }
.profile-evidence { padding:0 14px 12px; color:var(--muted); font-size:12px; }
.profile-evidence summary { cursor:pointer; font-weight:650; }
.profile-evidence ul { margin:8px 0 0; padding-left:18px; }
.audit-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:12px; }
.audit-item {
  min-width:0;
  min-height:132px;
  padding:16px;
  display:flex;
  flex-direction:column;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:transform 160ms var(--ease),border-color 160ms var(--ease),box-shadow 160ms var(--ease);
}
.audit-item:hover { transform:translateY(-2px); border-color:#B7AA98; box-shadow:var(--shadow-panel); }
.audit-item .domain { font-size:17px; font-weight:750; word-break:break-word; }
.audit-item .place { color:var(--muted); font-size:12px; line-height:1.45; margin-top:5px; overflow-wrap:anywhere; }
.audit-item .audit-meta { display:flex; align-items:center; justify-content:space-between; gap:10px 12px; margin-top:auto; padding-top:14px; font-size:11px; color:var(--muted); flex-wrap:wrap; }
.audit-item .audit-meta .danger { flex:0 0 auto; }
.audit-item .audit-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; width:100%; max-width:100%; flex-wrap:wrap; }
.audit-item .audit-actions button { min-height:34px; padding:7px 12px; font-size:12px; }
.audit-head { display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.audit-head h2 { font-family:var(--font-display); font-size:22px; letter-spacing:-.035em; }
.audit-head-copy { min-width:0; }
.audit-next {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:22px;
  padding:18px 20px;
  border:1px solid var(--line-strong);
  border-radius:14px;
  background:var(--sunken);
}
.audit-next-copy { min-width:0; }
.audit-next-step { display:block; margin-bottom:4px; color:var(--brand-ink); font-size:12px; font-weight:750; }
.audit-next h3 { margin:0; font-size:18px; text-wrap:balance; }
.audit-next p { max-width:68ch; margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.audit-next button { flex:0 0 auto; min-width:210px; min-height:46px; }
.audit-next button[aria-busy="true"] { cursor:wait; }
.audit-next-progress { height:5px; margin-top:12px; overflow:hidden; border-radius:999px; background:var(--line); }
.audit-next-progress span { display:block; height:100%; border-radius:inherit; background:var(--brand); transition:width 400ms var(--ease); }
.audit-secondary { margin-top:10px; }
.audit-secondary > summary { width:max-content; cursor:pointer; color:var(--muted); font-size:12px; font-weight:650; }
.audit-secondary > summary:hover { color:var(--ink); }
.audit-secondary-actions { display:flex; align-items:end; gap:8px; flex-wrap:wrap; margin-top:10px; padding:12px; border-radius:12px; background:var(--sunken); }
.audit-brand-field { min-width:220px; margin-right:auto; }
.audit-brand-field label { font-size:11px; }
.workspace-back-row { display:flex; align-items:center; margin-bottom:14px; }
.workspace-back-row button { padding-left:14px; }
.workspace-tabs { margin:18px 0 20px; }
.workspace-tabs button { min-width:112px; }
.project-toolbar {
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 22px;
}
.project-toolbar > div { width:min(100%,300px); flex:0 1 300px; }
.project-toolbar input,.project-toolbar select { width:100%; }
.projects-registry-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.project-create-panel { margin:18px 0; padding:18px; border:1px solid var(--line); border-radius:14px; background:var(--sunken); }
.project-create-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.project-create-head h2 { margin:0; font-size:17px; }
.project-create-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.project-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-create-section { margin-top:16px; padding-top:16px; border-top:1px solid var(--line-strong); }
.project-create-section h3 { margin:0 0 3px; font-size:14px; }
.project-create-section > p { margin:0 0 12px; color:var(--muted); font-size:12px; }
.project-create-grid .span-2 { grid-column:1 / -1; }
.project-create-grid select[multiple] { min-height:112px; padding:7px; }
.project-create-grid select[multiple] option { padding:7px 8px; border-radius:7px; }
.project-create-grid select[multiple] option:checked { background:var(--brand-tint); color:var(--brand-ink); }
.project-service-checks { display:flex; flex-wrap:wrap; gap:8px; }
.project-service-checks label { display:flex; align-items:center; gap:7px; min-height:44px; margin:0; padding:8px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.project-service-checks input { width:auto; }
.project-team-detail { display:grid; grid-template-columns:1fr 1fr; gap:24px; padding:15px; border-top:1px solid var(--line); }
.project-team-detail h4 { margin:0 0 8px; font-size:13px; }
.project-team-detail p { margin:0 0 16px; color:var(--muted); font-size:13px; }
.project-team-detail ul { display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.project-team-detail li strong,.project-team-detail li span { display:block; }
.project-team-detail li span { color:var(--muted); font-size:11px; }
.project-create-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:14px; }
.project-owner-group + .project-owner-group { margin-top:28px; padding-top:24px; border-top:1px solid var(--line); }
.project-owner-head { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:12px; }
.project-owner-head h3 { margin:0; font-size:16px; }
.project-owner-head span { color:var(--muted); font-size:12px; }
.project-owner-group .audit-list { grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr)); }
.project-progress { margin-top:13px; }
.project-progress-head { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; }
.project-progress-track { height:6px; margin-top:6px; overflow:hidden; border-radius:999px; background:var(--sunken); }
.project-progress-track span { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.project-deadline { color:var(--ink-soft); font-size:11px; }
.operational-summary { margin:14px 0 0; }
  .presale-summary { margin-top:14px; background:var(--sunken); }
  .presale-summary-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:0;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    background:#fff;
  }
  .presale-summary-head h3 { margin:0; font-size:14px; }
  .presale-summary-head p { margin:3px 0 0; color:var(--muted); font-size:12px; }
  .presale-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    padding:14px;
  }
  .presale-card {
    display:flex;
    min-width:0;
    min-height:168px;
    flex-direction:column;
    padding:16px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#fff;
  }
  .presale-card-head { display:flex; min-width:0; align-items:center; justify-content:space-between; gap:12px; }
  .presale-card h4 { margin:0; font-size:14px; }
  .presale-card p { margin:10px 0 16px; color:var(--muted); font-size:12px; line-height:1.55; }
  .presale-card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:auto; }
.presale-back { margin-bottom:12px; }
.workspace-empty { max-width:720px; padding:28px 0 12px; }
.workspace-empty h3 { margin-bottom:8px; }
.monthly-report-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.monthly-report-head h3 { margin:0; font-size:18px; }
.monthly-report-head p { max-width:70ch; margin:5px 0 0; }
.report-connect {
  padding:16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--sunken);
}
.report-connect-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(150px,.7fr)) minmax(210px,1fr) minmax(240px,1.2fr);
  gap:12px;
  align-items:start;
}
.report-connect-grid > div { min-width:0; }
.report-connect-topvisor { grid-column:span 2; }
.report-connect-actions { grid-column:span 2; display:flex; flex-wrap:wrap; gap:10px; align-self:center; justify-content:flex-end; }
.report-connect-grid > button { align-self:start; white-space:nowrap; }
.report-field-hint { margin-top:5px; color:var(--muted); font-size:11px; line-height:1.35; }
.report-source-grid {
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(240px,1fr) auto;
  gap:10px;
  align-items:start;
  margin-top:12px;
}
.report-source-grid > button { margin-top:27px; }
.report-source-grid select[multiple] { min-height:116px; padding:7px; }
.report-source-grid select[multiple] option { padding:6px 7px; border-radius:6px; }
.report-source-grid select[multiple] option:checked { background:var(--brand-tint); color:var(--brand-ink); }
.report-layout {
  display:grid;
  grid-template-columns:minmax(210px,.28fr) minmax(0,1fr);
  gap:16px;
  margin-top:18px;
}
.report-history {
  align-self:start;
  padding:8px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--sunken);
}
.report-history-title { padding:8px 9px 10px; color:var(--muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.report-history-item {
  width:100%;
  padding:11px;
  display:block;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:var(--ink);
  text-align:left;
  box-shadow:none;
}
.report-history-item:hover { transform:none; border-color:var(--line-strong); background:#fff; }
.report-history-item.active { border-color:#E69787; background:#fff; }
.report-history-item strong,.report-history-item span { display:block; }
.report-history-item strong { font-size:13px; }
.report-history-item span { margin-top:3px; color:var(--muted); font-size:11px; }
.report-editor {
  min-width:0;
  padding:20px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.report-editor-empty { min-height:260px; display:grid; place-items:center; color:var(--muted); text-align:center; }
.report-editor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.report-editor-head h4 { margin:0; font-size:17px; }
.report-editor-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.report-editor-actions { display:flex; gap:8px; flex-wrap:wrap; }
.report-summary-editor { margin:18px 0 22px; padding:16px; border-radius:12px; background:var(--sunken); }
.report-summary-editor h5 { margin:0 0 12px; font-size:15px; }
.report-summary-editor textarea { min-height:86px; background:#fff; }
.report-summary-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.report-summary-fields .span-2 { grid-column:1 / -1; }
.report-plan-progress { display:grid; grid-template-columns:auto minmax(140px,1fr) auto; align-items:center; gap:12px; margin-top:12px; color:var(--ink-soft); font-size:12px; }
.report-plan-progress strong { color:var(--ink); font-size:13px; }
.report-plan-track { height:8px; overflow:hidden; border-radius:999px; background:#DDD2C4; }
.report-plan-track span { display:block; height:100%; border-radius:inherit; background:var(--ok); }
.report-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:8px; margin:18px 0; }
.report-kpi { min-width:0; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); }
.report-kpi-label { min-height:31px; color:var(--muted); font-size:11px; font-weight:650; }
.report-kpi-value { margin-top:4px; font-size:22px; font-weight:750; letter-spacing:-.035em; }
.report-kpi-change { margin-top:3px; font-size:11px; font-weight:700; }
.report-kpi-change.good { color:var(--ok); }
.report-kpi-change.bad { color:var(--err); }
.report-kpi-change.neutral { color:var(--muted); }
.report-chart {
  position:relative;
  margin:14px 0 18px;
  padding:15px;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(180deg,#fff 0%,var(--chart-surface) 100%);
  box-shadow:0 8px 22px -20px rgba(26,23,20,.55);
}
.report-chart-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:12px; }
.report-chart-head strong { display:block; font-size:14px; line-height:1.35; }
.report-chart-head span { display:block; max-width:62ch; margin-top:3px; color:var(--muted); font-size:11px; line-height:1.45; }
.report-chart-legend { display:flex; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.report-chart-legend-item {
  min-height:34px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink-soft);
  font-size:11px;
  font-weight:650;
  box-shadow:none;
  cursor:pointer;
}
.report-chart-legend-item:hover { transform:none; border-color:var(--line-strong); background:var(--sunken); }
.report-chart-legend-item[aria-pressed="false"] { opacity:.48; text-decoration:line-through; }
.report-chart-legend-line { width:24px; height:10px; flex:0 0 24px; overflow:visible; }
.report-chart-scroll { position:relative; overflow-x:auto; overflow-y:hidden; border-radius:10px; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
.report-chart-scroll > svg { display:block; width:100%; min-width:600px; height:auto; overflow:visible; }
.report-chart[data-chart-density="dense"] .report-chart-scroll > svg { min-width:760px; }
.report-chart-grid { stroke:#E8E1D7; stroke-width:1; }
.report-chart-axis { fill:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.report-chart-value { fill:var(--ink); font-size:11px; font-weight:750; font-variant-numeric:tabular-nums; }
.report-chart [data-chart-series] { transition:opacity .18s var(--ease); }
.report-chart [data-chart-series].is-muted { opacity:.1; pointer-events:none; }
.report-chart-target { fill:transparent; cursor:crosshair; }
.report-chart-point { stroke:#fff; stroke-width:2.5; vector-effect:non-scaling-stroke; }
.report-chart [data-chart-point]:focus { outline:none; }
.report-chart [data-chart-point]:focus .report-chart-point,
.report-chart [data-chart-point]:hover .report-chart-point { stroke:var(--ink); stroke-width:3.5; }
.report-chart-tooltip {
  position:absolute;
  z-index:4;
  min-width:128px;
  max-width:220px;
  padding:9px 11px;
  border-radius:10px;
  background:var(--dark);
  color:#fff;
  font-size:11px;
  line-height:1.4;
  box-shadow:0 12px 30px rgba(26,23,20,.24);
  pointer-events:none;
  transform:translate(-50%,calc(-100% - 10px));
}
.report-chart-tooltip[data-position="below"] { transform:translate(-50%,10px); }
.report-chart-tooltip strong,.report-chart-tooltip span { display:block; margin:0; color:inherit; }
.report-chart-tooltip strong { font-size:12px; }
.report-chart-tooltip span { margin-top:2px; color:#E7DED3; }
.report-chart-hint { display:none; margin:7px 0 0; color:var(--muted); font-size:10px; }
.report-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.report-form-grid .span-2 { grid-column:1 / -1; }
.report-form-grid textarea { min-height:112px; resize:vertical; }
.report-section-title { margin:22px 0 10px; font-size:14px; }
.report-block { margin-top:16px; padding:17px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.report-block:first-of-type { margin-top:18px; }
.report-block-head { display:flex; align-items:flex-start; gap:11px; margin-bottom:12px; }
.report-block-index { display:grid; place-items:center; width:26px; height:26px; flex:0 0 26px; border-radius:8px; background:var(--brand-tint); color:var(--brand-ink); font-size:11px; font-weight:800; }
.report-block-head h5 { margin:1px 0 0; font-size:15px; line-height:1.35; text-wrap:balance; }
.report-block-head p { max-width:72ch; margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.report-block-editor { margin-top:14px; border-top:1px solid var(--line); }
.report-block-editor summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--brand-ink); font-size:12px; font-weight:750; list-style:none; }
.report-block-editor summary::-webkit-details-marker { display:none; }
.report-block-editor summary::before { content:'+'; width:20px; margin-right:6px; font-size:17px; font-weight:500; }
.report-block-editor[open] summary::before { content:'−'; }
.report-note-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:2px 0 4px; }
.report-note-grid textarea { min-height:104px; resize:vertical; background:var(--sunken); }
.report-note-grid .report-generated-output textarea { border-color:#D8B4A9; background:#FFF8F4; }
.report-kpi-grid.three { grid-template-columns:repeat(3,minmax(140px,1fr)); }
.report-metric-pair { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.report-metric-pair small { color:var(--muted); font-size:10px; }
.report-table-note { margin:8px 0 0; color:var(--muted); font-size:11px; }
.report-chart-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.report-chart-area { opacity:.1; }
.report-donut-layout { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(220px,1fr); gap:18px; align-items:center; margin:12px 0 16px; }
.report-donut-layout svg { width:100%; max-width:300px; margin:auto; }
.report-donut-legend { display:grid; gap:7px; }
.report-donut-legend > span { display:grid; grid-template-columns:10px minmax(0,1fr) auto; gap:8px; align-items:center; color:var(--ink-soft); font-size:11px; }
.report-donut-legend i { width:10px; height:10px; border-radius:3px; }
.report-donut-legend b { color:var(--ink); font-size:11px; }
.report-donut-legend small { display:block; margin-top:1px; color:var(--muted); font-size:10px; }
.report-donut-total { fill:var(--ink); font-size:5px; font-weight:800; text-anchor:middle; font-variant-numeric:tabular-nums; }
.report-donut-caption { fill:var(--muted); font-size:2.6px; text-anchor:middle; }
.report-share-bars { display:grid; gap:11px; }
.report-share-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(180px,1.35fr) 92px; gap:12px; align-items:center; }
.report-share-label { min-width:0; }
.report-share-label strong { display:block; overflow-wrap:anywhere; font-size:11px; line-height:1.35; }
.report-share-label span,.report-share-value span { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.report-share-track { height:12px; overflow:hidden; border-radius:999px; background:#E9E1D6; }
.report-share-track span { display:block; height:100%; min-width:3px; border-radius:inherit; }
.report-share-value { text-align:right; font-variant-numeric:tabular-nums; }
.report-share-value strong { font-size:12px; }
.report-comparison-bands { display:grid; gap:14px; }
.report-comparison-row { display:grid; grid-template-columns:minmax(130px,.8fr) minmax(250px,1.8fr) auto; gap:14px; align-items:center; }
.report-comparison-label strong { display:block; font-size:11px; line-height:1.35; }
.report-comparison-label span { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.report-comparison-lines { display:grid; gap:6px; }
.report-comparison-line { display:grid; grid-template-columns:44px minmax(100px,1fr) auto; gap:8px; align-items:center; color:var(--muted); font-size:10px; }
.report-comparison-track { height:10px; overflow:hidden; border-radius:999px; background:#E9E1D6; }
.report-comparison-track i { display:block; height:100%; min-width:3px; border-radius:inherit; }
.report-comparison-number { min-width:58px; color:var(--ink); text-align:right; font-weight:750; font-variant-numeric:tabular-nums; }
.report-details { margin-top:10px; }
.report-details summary { min-height:40px; cursor:pointer; color:var(--brand-ink); font-size:12px; font-weight:700; }
.external-entry-list { display:grid; gap:10px; }
.external-entry-row { display:grid; grid-template-columns:1fr 1fr; gap:9px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--sunken); }
.external-entry-row > * { min-width:0; }
.external-entry-row input,.external-entry-row textarea { max-width:100%; }
.external-entry-row .span-2 { grid-column:1 / -1; }
.external-entry-row textarea { min-height:70px; resize:vertical; }
.external-entry-row-head { grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.external-entry-row-head strong { font-size:12px; }
.external-entry-remove { min-height:40px; padding:7px 11px; }
.report-analysis { margin:12px 0 18px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.report-analysis-item { display:grid; grid-template-columns:180px minmax(0,1fr); gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.report-analysis-item:last-child { border-bottom:0; }
.report-analysis-item strong { font-size:12px; line-height:1.45; }
.report-analysis-item span { color:var(--ink-soft); font-size:12px; line-height:1.5; }
.report-analysis-item[data-tone="positive"] strong { color:var(--ok); }
.report-analysis-item[data-tone="negative"] strong { color:var(--err); }
.report-analysis-item[data-tone="action"] strong { color:var(--brand); }
.report-landing-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.report-landing-grid section { min-width:0; }
.report-landing-grid h6 { margin:0 0 8px; font-size:12px; }
.report-growth-link { white-space:nowrap; font-size:12px; font-weight:700; }
.report-source-note { margin-top:10px; color:var(--muted); font-size:11px; }
.monthly-works-table textarea { min-width:190px; min-height:64px; resize:vertical; }
.monthly-works-table select { min-width:160px; }
.monthly-entry-list { display:grid; gap:8px; }
.monthly-entry-row { display:grid; grid-template-columns:minmax(280px,1.35fr) minmax(220px,.8fr) 40px; gap:8px; align-items:start; }
.monthly-entry-row.names-only { grid-template-columns:minmax(280px,1fr) 40px; }
.monthly-entry-row textarea { min-height:72px; resize:vertical; }
.monthly-entry-row input { min-height:44px; }
.monthly-entry-remove { width:40px; min-width:40px; height:40px; padding:0; font-size:18px; }
.monthly-entry-actions { display:flex; justify-content:flex-start; margin-top:10px; }
.monthly-comparison-note { display:flex; gap:12px; flex-wrap:wrap; margin:8px 0 12px; color:var(--muted); font-size:11px; }
.audit-steps {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin:20px 0;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
}
.audit-steps.hidden { display:none; }
.audit-step { min-height:72px; padding:13px; border-right:1px solid var(--line); background:var(--sunken); }
.audit-step:last-child { border-right:0; }
.audit-step.done { background:var(--ok-bg); }
.audit-step.current { background:var(--brand-tint); }
.audit-step b { display:block; font-size:12px; }
.audit-step span { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.site-metric {
  margin:0 0 12px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.site-metric.target { border-color:#E69787; }
.site-metric-head {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:52px;
  padding:10px 14px;
  border-bottom:1px solid var(--line);
  background:var(--sunken);
}
.site-metric.target .site-metric-head { background:var(--brand-tint); }
.site-metric-head strong { font-size:15px; word-break:break-word; }
.site-metric-head .source { margin-left:auto; font-size:11px; color:var(--muted); }
.metric-grid { display:grid; grid-template-columns:repeat(6,minmax(105px,1fr)); }
.metric-field { padding:10px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.metric-field:nth-child(6n) { border-right:0; }
.metric-field label { min-height:30px; margin-bottom:4px; font-size:10px; line-height:1.2; }
.metric-field input { min-height:38px; padding:7px 9px; border-radius:8px; font-variant-numeric:tabular-nums; }
.competitor-add { display:grid; grid-template-columns:minmax(190px,360px) auto; gap:9px; align-items:end; margin:14px 0; }
.candidate-box { margin:12px 0; padding:13px; border:1px dashed var(--line-strong); border-radius:12px; }
.chips { display:flex; gap:7px; flex-wrap:wrap; margin-top:8px; }
.chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line-strong);
  border-radius:999px;
  background:#fff;
  font-size:12px;
}
.chip input { margin:0; }
.structure-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.structure-card { padding:15px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.structure-card h4 { margin:0 0 5px; }
.section-bars { display:grid; gap:7px; margin-top:12px; }
.section-bar { display:grid; grid-template-columns:minmax(70px,1fr) 3fr auto; align-items:center; gap:8px; font-size:11px; }
.section-bar .track { height:7px; border-radius:999px; overflow:hidden; background:var(--sunken); }
.section-bar .fill { height:100%; border-radius:999px; background:var(--brand); }
.strategy-list { counter-reset:strategy; display:grid; gap:10px; }
.strategy-item { position:relative; padding:15px 15px 15px 58px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.strategy-item::before {
  counter-increment:strategy;
  content:counter(strategy);
  position:absolute;
  left:15px; top:15px;
  width:28px; height:28px;
  display:grid; place-items:center;
  border-radius:50%;
  background:var(--dark); color:#fff;
  font-weight:750;
}
.strategy-item h4 { margin:2px 0 6px; }
.strategy-item p { margin:0; color:var(--muted); font-size:13px; }
.inline-note { padding:11px 13px; border:1px solid #E9A18F; border-radius:12px; background:var(--brand-tint); color:var(--brand-ink); font-size:12px; }
.audit-section { margin-top:30px; padding-top:26px; border-top:1px solid var(--line); }
.audit-section:first-child { margin-top:0; padding-top:0; border-top:0; }
.audit-section-head { margin-bottom:13px; }
.audit-section-head h3 { margin:0; font-size:18px; line-height:1.3; letter-spacing:-.015em; text-wrap:balance; }
.audit-section-head p { max-width:72ch; margin:5px 0 0; color:var(--muted); font-size:13px; text-wrap:pretty; }
.audit-conclusion { margin-top:14px; padding:14px 16px; border:1px solid #E9A18F; border-radius:12px; background:var(--brand-tint); color:var(--brand-ink); font-size:13px; }
.audit-conclusion strong { display:block; margin-bottom:5px; color:var(--ink); }
.audit-actions { display:grid; gap:8px; margin:12px 0 0; padding:0; list-style:none; }
.audit-actions li { padding:10px 12px; border-bottom:1px solid var(--line); color:var(--ink-soft); font-size:13px; }
.audit-actions li:last-child { border-bottom:0; }
.audit-draft-tools { margin:14px 0 16px; }
.audit-draft-status {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.audit-draft-status strong { display:block; margin-bottom:3px; }
.audit-draft-status p { max-width:72ch; margin:0; color:var(--muted); font-size:12px; }
.audit-draft-status .badge { flex:0 0 auto; }
.audit-brief { margin-top:10px; border:1px solid var(--line); border-radius:14px; background:var(--sunken); }
.audit-brief summary { padding:13px 15px; color:var(--ink); font-weight:700; cursor:pointer; }
.audit-brief[open] summary { border-bottom:1px solid var(--line); }
.audit-brief-body { padding:15px; }
.audit-brief-body > p { max-width:76ch; margin:0 0 13px; color:var(--muted); font-size:13px; }
.audit-brief-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.audit-brief-grid textarea { min-height:92px; resize:vertical; }
.audit-brief-actions { display:flex; align-items:center; gap:10px; margin-top:12px; }
.stage-block + .stage-block { margin-top:24px; padding-top:22px; border-top:1px solid var(--line); }
.stage-block h3 { margin:0 0 5px; font-size:18px; text-wrap:balance; }
.stage-block > p { max-width:75ch; margin:0 0 13px; color:var(--muted); font-size:13px; }
.section-summary { max-width:82ch; margin:0 0 16px; color:var(--ink-soft); font-size:14px; text-wrap:pretty; }
.estimate-panel {
  margin-top:14px;
  padding:18px;
  border:1px solid var(--line-strong);
  border-radius:14px;
  background:var(--sunken);
}
.estimate-head { display:flex; align-items:flex-start; gap:16px; }
.estimate-head h3 { margin:0; font-size:18px; letter-spacing:-.015em; }
.estimate-head p { max-width:72ch; margin:5px 0 0; color:var(--muted); font-size:13px; }
.estimate-head .ghost { margin-left:auto; flex:0 0 auto; }
.estimate-controls {
  display:grid;
  grid-template-columns:minmax(210px,300px) minmax(210px,300px) max-content max-content;
  gap:10px;
  align-items:end;
  margin-top:16px;
}
.estimate-price { position:relative; }
.estimate-price input { padding-right:94px; font-variant-numeric:tabular-nums; }
.estimate-price span {
  position:absolute;
  right:13px;
  bottom:13px;
  color:var(--muted);
  font-size:12px;
  pointer-events:none;
}
.estimate-result { margin-top:16px; }
.estimate-summary {
  display:flex;
  align-items:baseline;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px;
}
.estimate-summary strong { color:var(--ink); font-size:16px; font-variant-numeric:tabular-nums; }
.estimate-result .tablewrap { max-height:none; }
.estimate-result h4 { margin:16px 0 8px; font-size:14px; }
.estimate-result .inline-note { margin-top:12px; }
.work-plan-settings {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:10px;
  margin-top:16px;
}
.plan-settings { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.plan-settings summary { width:max-content; cursor:pointer; color:var(--ink-soft); font-size:12px; font-weight:700; }
.plan-sync-bar { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:70px; margin-top:14px; padding:12px 0; border-block:1px solid var(--line); }
.plan-sync-main { display:flex; align-items:center; gap:12px; min-width:0; }
.plan-sync-copy { min-width:0; }
.plan-sync-copy strong { display:block; font-size:13px; }
.plan-sync-copy span { display:block; margin-top:3px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.plan-sync-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.plan-sync-actions button { min-height:36px; padding:6px 12px; font-size:12px; }
.plan-sync-bar:has(.plan-publish-setup) { flex-wrap:wrap; }
.plan-publish-setup { flex-basis:100%; display:grid; gap:6px; }
.plan-publish-setup label { font-size:12px; font-weight:600; }
.plan-publish-setup span { color:var(--muted); font-size:11px; }
.plan-publish-row { display:flex; gap:8px; flex-wrap:wrap; }
.plan-publish-row input { flex:1 1 280px; min-height:36px; }
.plan-publish-row button { min-height:36px; padding:6px 12px; font-size:12px; }
.plan-autosave-note.pending { color:var(--warn); }
.plan-client-comment { margin-top:6px; padding:6px 8px; border-left:3px solid var(--warn); background:var(--warn-bg); font-size:12px; overflow-wrap:anywhere; }
.plan-sync-preview { width:100%; display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.plan-sync-preview-copy { min-width:0; }
.plan-sync-preview-copy strong { display:block; font-size:13px; }
.plan-sync-preview-copy > span { display:block; margin-top:4px; color:var(--body); font-size:12px; }
.plan-sync-metrics { display:flex; gap:6px; flex-wrap:wrap; margin-top:9px; }
.plan-sync-metrics span { padding:4px 8px; border-radius:999px; background:var(--sunken); color:var(--body); font-size:10px; font-weight:650; }
.plan-sync-removals { margin:8px 0 0; padding-left:18px; color:var(--body); font-size:11px; }
.plan-sync-removals li + li { margin-top:3px; }
.work-plan-history {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-top:16px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--sunken);
}
.work-plan-history-copy { min-width:0; }
.work-plan-history-copy strong { display:block; color:var(--ink); font-size:13px; }
.work-plan-history-copy span { display:block; margin-top:3px; color:var(--muted); font-size:12px; }
.work-plan-history-select { width:min(100%,360px); flex:0 0 min(42%,360px); }
.work-plan-history-select label { display:block; margin-bottom:5px; }
.work-plan-history-select select { width:100%; }
.work-plan-archive-note {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--sunken);
  color:var(--body);
  font-size:12px;
}
.work-plan-result-links { display:flex; flex-direction:column; gap:4px; margin-top:5px; }
.work-plan-result-links a { color:var(--brand-ink); font-size:11px; font-weight:600; overflow-wrap:anywhere; }
.work-plan-table :disabled { color:var(--body); opacity:1; cursor:default; }
.work-plan-table textarea:disabled,
.work-plan-table input:disabled,
.work-plan-table select:disabled { background:transparent; -webkit-text-fill-color:var(--body); }
.work-plan-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.work-plan-result { margin-top:16px; }
.work-plan-summary {
  display:flex;
  align-items:baseline;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:10px;
  color:var(--muted);
  font-size:12px;
}
.work-plan-summary strong { color:var(--ink); font-size:16px; }
.work-plan-table { min-width:820px; }
.work-plan-table th:nth-child(1) { width:42%; }
.work-plan-table th:nth-child(2) { width:15%; }
.work-plan-table th:nth-child(3) { width:18%; }
.work-plan-table th:nth-child(4) { width:25%; }
.work-plan-table td { padding:8px 6px; vertical-align:top; }
.work-plan-table input,
.work-plan-table select,
.work-plan-table textarea {
  min-height:36px;
  padding:7px 8px;
  border-color:transparent;
  border-radius:8px;
  background:transparent;
  font-size:12px;
}
.work-plan-table textarea { min-height:54px; }
.plan-task-priority { display:flex; align-items:center; gap:6px; margin-top:4px; }
.plan-task-priority span { flex:0 0 auto; color:var(--muted); font-size:10px; font-weight:600; }
.plan-task-priority select { width:auto; min-height:30px; padding:4px 28px 4px 7px; color:var(--muted); font-size:11px; }
.plan-task-meta { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; }
.plan-task-meta span,.plan-shared-result { display:inline-flex; padding:3px 7px; border-radius:999px; background:var(--sunken); color:var(--muted); font-size:9px; font-weight:650; }
.plan-shared-result { margin-top:5px; }
.plan-shared-result-note { max-width:28ch; padding:7px 8px; color:var(--body); font-size:11px; line-height:1.45; }
.work-plan-table input:hover,
.work-plan-table select:hover,
.work-plan-table textarea:hover { border-color:var(--line-strong); background:#fff; }
.work-plan-table .plan-section-row td {
  padding:8px 10px;
  background:var(--dark);
  color:#fff;
  font-weight:700;
  border-bottom:0;
}
.work-plan-shift { margin:10px 0 0; }

/* AI visibility — аналитический пульт внутри общей дизайн-системы */
.ai-hero { min-height:320px; }
.ai-hero::after { content:""; position:absolute; right:124px; top:82px; width:12px; height:12px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 8px rgba(242,78,46,.18),0 0 34px 14px rgba(242,78,46,.28); animation:aiPulse 2.6s ease-in-out infinite; }
@keyframes aiPulse { 50% { transform:scale(.72); opacity:.62; } }
.ai-hero-meta { display:flex; gap:22px; flex-wrap:wrap; margin-top:28px; }
.ai-hero-meta span { display:flex; align-items:center; gap:8px; color:#E9DFD3; font-size:12px; }
.ai-hero-meta i { width:7px; height:7px; border-radius:50%; background:var(--brand); }
.ai-toolbar { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.ai-toolbar h2 { margin:0; }
.ai-project-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr)); gap:13px; }
.ai-project-card { position:relative; min-height:205px; padding:19px; border:1px solid var(--line); border-radius:15px; background:#fff; cursor:pointer; transition:transform 180ms var(--ease),border-color 180ms var(--ease),box-shadow 180ms var(--ease); }
.ai-project-card:hover { transform:translateY(-2px); border-color:#B9A995; box-shadow:var(--shadow-panel); }
.ai-project-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.ai-project-card h3 { margin:0; font-size:17px; letter-spacing:-.02em; }
.ai-domain { margin-top:4px; color:var(--muted); font-size:12px; }
.ai-score { width:64px; height:64px; display:grid; place-content:center; flex:0 0 auto; border:1px solid #EDB4A7; border-radius:50%; background:var(--brand-tint); color:var(--brand-ink); }
.ai-score strong { display:block; font-family:var(--font-display); font-size:18px; line-height:1; text-align:center; }
.ai-score span { display:block; margin-top:3px; font-size:9px; text-align:center; text-transform:uppercase; }
.ai-project-foot { position:absolute; left:19px; right:19px; bottom:18px; display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; }
.ai-create-grid,.ai-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.ai-span-2 { grid-column:1/-1; }
.ai-workspace-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; flex-wrap:wrap; }
.ai-workspace-head h2 { font-family:var(--font-display); font-size:24px; letter-spacing:-.04em; }
.ai-actions { display:flex; gap:9px; flex-wrap:wrap; }
.ai-share-box { margin-top:13px; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); }
.ai-share-box label { margin-bottom:7px; }
.ai-share-controls { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:center; }
.ai-share-controls input { min-width:0; min-height:44px; background:#fff; }
.ai-share-controls button { min-height:44px; }
.ai-share-status { min-height:18px; margin-top:6px; color:var(--muted); font-size:11px; }
.ai-models { display:flex; gap:10px; flex-wrap:wrap; padding-top:4px; }
.ai-model-option { display:flex; align-items:center; gap:8px; min-height:42px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); font-size:12px; font-weight:650; }
.ai-model-option input { accent-color:var(--brand); }
.ai-run-strip { display:grid; grid-template-columns:minmax(0,1fr) 160px auto auto; gap:12px; align-items:end; margin-top:16px; padding:15px; border:1px solid var(--line); border-radius:14px; background:var(--sunken); }
.ai-run-note { align-self:center; color:var(--muted); font-size:12px; }
.ai-dashboard { margin-top:20px; }
.ai-metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.ai-metric { min-height:116px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.ai-metric strong { display:block; font-family:var(--font-display); font-size:26px; line-height:1; letter-spacing:-.04em; }
.ai-metric span { display:block; margin-top:10px; color:var(--muted); font-size:11px; }
.ai-breakdown { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:14px; }
.ai-breakdown-panel { padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.ai-breakdown-panel h3 { margin:0 0 14px; font-size:14px; }
.ai-bar-row { display:grid; grid-template-columns:minmax(100px,1fr) 2fr 42px; gap:10px; align-items:center; margin-top:9px; font-size:11px; }
.ai-bar-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ai-bar-track { height:7px; overflow:hidden; border-radius:99px; background:var(--sunken); }
.ai-bar-track span { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.ai-competitor-panel { margin-top:14px; padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.ai-competitor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.ai-competitor-head h3 { margin:0; font-size:14px; }
.ai-competitor-head p { max-width:720px; margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.ai-competitor-sample { flex:0 0 auto; color:var(--muted); font-size:10px; font-weight:650; }
.ai-competitor-list { display:grid; gap:10px; }
.ai-competitor-row { display:grid; grid-template-columns:minmax(150px,1fr) minmax(180px,2fr) 104px; gap:12px; align-items:center; }
.ai-competitor-name { min-width:0; overflow-wrap:anywhere; font-size:12px; font-weight:700; }
.ai-competitor-name span { display:inline-flex; margin-left:6px; padding:3px 6px; border-radius:999px; background:var(--brand-tint); color:var(--brand-ink); font-size:9px; }
.ai-competitor-track { height:10px; overflow:hidden; border-radius:999px; background:var(--sunken); }
.ai-competitor-track span { display:block; height:100%; min-width:3px; border-radius:inherit; background:#776D60; }
.ai-competitor-row.is-own .ai-competitor-track span { background:var(--brand); }
.ai-competitor-value { text-align:right; font-size:10px; color:var(--muted); font-variant-numeric:tabular-nums; }
.ai-competitor-value strong { display:block; color:var(--ink); font-size:12px; }
.ai-history { display:flex; gap:7px; flex-wrap:wrap; margin:16px 0; }
.ai-history button { min-height:34px; padding:6px 10px; font-size:11px; }
.ai-answer { margin-top:8px; padding:12px; border:1px solid var(--line); border-radius:11px; background:#fff; }
.ai-answer summary { cursor:pointer; font-size:12px; font-weight:700; }
.ai-answer-text { margin-top:10px; white-space:pre-wrap; color:var(--ink-soft); font-size:12px; line-height:1.6; }
.ai-source-list { margin:9px 0 0; padding-left:18px; font-size:11px; }
.ai-prompt-results { display:grid; gap:10px; }
.ai-prompt-result { margin:0; overflow:hidden; border:1px solid var(--line); border-radius:13px; background:#fff; }
.ai-prompt-result.is-found { border-color:#9ECDB1; background:#F3FAF6; box-shadow:inset 4px 0 0 var(--ok); }
.ai-prompt-result.is-error { border-color:#E6B4AB; background:var(--err-bg); }
.ai-prompt-summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 16px; min-height:72px; padding:14px 16px; cursor:pointer; list-style:none; }
.ai-prompt-summary::-webkit-details-marker { display:none; }
.ai-prompt-main { min-width:0; }
.ai-prompt-group { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.ai-prompt-main strong { display:block; color:var(--ink); font-size:13px; line-height:1.45; text-wrap:pretty; }
.ai-prompt-state { display:flex; align-items:center; justify-content:flex-end; gap:9px; }
.ai-result-badge { display:inline-flex; align-items:center; gap:6px; min-height:28px; padding:5px 9px; border-radius:999px; font-size:10px; font-weight:750; white-space:nowrap; }
.ai-result-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.ai-result-badge.found { background:var(--ok-bg); color:var(--ok); }
.ai-result-badge.missed { background:var(--sunken); color:var(--muted); }
.ai-result-badge.error { background:var(--err-bg); color:var(--err); }
.ai-prompt-toggle { color:var(--brand-ink); font-size:11px; font-weight:700; white-space:nowrap; }
.ai-prompt-toggle::before { content:"Показать ответы"; }
.ai-prompt-result[open] .ai-prompt-toggle::before { content:"Скрыть ответы"; }
.ai-prompt-models { grid-column:1 / -1; display:flex; gap:6px; flex-wrap:wrap; }
.ai-prompt-model-stat { padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.72); color:var(--muted); font-size:10px; }
.ai-prompt-model-stat strong { color:var(--ink); }
.ai-prompt-body { display:grid; gap:8px; padding:0 14px 14px; }
.ai-run-result { padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.ai-run-result-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.ai-run-result-head strong { font-size:12px; }
.ai-status-line { margin-top:13px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:12px; }
.ai-prompt-tools { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:8px; }
.ai-prompt-tools label { margin:0; }
.ai-prompt-builder { margin:4px 0 16px; overflow:hidden; border:1px solid #CFC1AE; border-radius:15px; background:#FBF7F1; }
.ai-prompt-builder-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:17px 18px; border-bottom:1px solid #DDD1C1; background:#F3EBDD; }
.ai-prompt-builder-head h3 { margin:0; font-family:var(--font-display); font-size:16px; letter-spacing:-.025em; }
.ai-prompt-builder-head p { max-width:660px; margin:5px 0 0; color:var(--muted); font-size:12px; }
.ai-prompt-builder-body { padding:17px 18px 18px; }
.ai-prompt-builder-grid { display:grid; grid-template-columns:2fr 1fr 1fr 130px; gap:11px; align-items:end; }
.ai-prompt-builder-grid textarea { min-height:76px; resize:vertical; }
.ai-prompt-builder-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:13px; }
.ai-prompt-builder-actions .ai-model-option { min-height:40px; padding-block:6px; }
.ai-generation-wait { margin-top:12px; padding:13px 14px; border:1px solid #D4C6B4; border-radius:12px; background:#fff; color:var(--ink-soft); }
.ai-generation-wait-head { display:flex; align-items:flex-start; gap:10px; }
.ai-generation-wait-dot { width:9px; height:9px; margin-top:4px; flex:0 0 auto; border-radius:50%; background:var(--brand); animation:ai-wait-pulse 1.6s ease-in-out infinite; }
.ai-generation-wait-copy { min-width:0; flex:1; }
.ai-generation-wait-copy strong { display:block; font-size:12px; }
.ai-generation-wait-copy span { display:block; max-width:68ch; margin-top:3px; color:var(--muted); font-size:11px; line-height:1.5; }
.ai-generation-wait-time { flex:0 0 auto; color:var(--brand-ink); font-size:11px; font-weight:750; white-space:nowrap; }
.ai-generation-wait-steps { display:flex; gap:6px; flex-wrap:wrap; margin:10px 0 0 19px; }
.ai-generation-wait-steps span { padding:5px 8px; border-radius:7px; background:var(--sunken); color:#574C41; font-size:10px; font-weight:650; }
@keyframes ai-wait-pulse { 0%,100% { opacity:.42; transform:scale(.78); } 50% { opacity:1; transform:scale(1); } }
.ai-prompt-context { display:flex; gap:7px; flex-wrap:wrap; margin:14px 0 0; }
.ai-context-chip { padding:6px 9px; border:1px solid #D9CDBE; border-radius:99px; background:#fff; color:var(--ink-soft); font-size:11px; }
.ai-suggestion-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; padding-top:14px; border-top:1px solid #DDD1C1; }
.ai-suggestion-summary strong { font-family:var(--font-display); font-size:14px; }
.ai-coverage { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.ai-coverage span { padding:5px 8px; border-radius:7px; background:#E9DFD1; color:#4A4036; font-size:10px; font-weight:700; }
.ai-suggestion-list { max-height:410px; margin-top:10px; overflow:auto; border:1px solid #D9CDBE; border-radius:12px; background:#fff; }
.ai-suggestion { display:grid; grid-template-columns:22px 104px minmax(0,1fr) 40px; gap:9px; align-items:start; padding:11px 12px; border-bottom:1px solid #E7DED2; cursor:pointer; }
.ai-suggestion:last-child { border-bottom:0; }
.ai-suggestion:hover { background:#FCF8F3; }
.ai-suggestion input { margin-top:2px; accent-color:var(--brand); }
.ai-suggestion-group { color:var(--brand-ink); font-size:10px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; }
.ai-suggestion-text { color:var(--ink-soft); font-size:12px; line-height:1.45; }
.ai-suggestion-score { color:var(--muted); font-family:var(--font-display); font-size:11px; text-align:right; }
.ai-prompt-apply { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.ai-prompt-apply .muted { font-size:11px; }

@media (max-width:1100px) {
  .estimate-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .estimate-controls button { width:100%; }
  .work-plan-settings { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-connect-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-connect-grid > button { grid-column:1 / -1; width:max-content; margin-top:0; }
  .sheet-sync-shell { grid-template-columns:310px minmax(0,1fr); }
}

@media (max-width:720px) {
  .header-inner { min-height:62px; padding:11px 16px; }
  .wordmark { font-size:15px; }
  .business-unit-switch button { padding-inline:9px; }
  header .ver { display:none; }
  .mode-switch { margin-left:auto; }
  .mode-switch button { padding-inline:10px; }
  .wrap { padding:16px; }
  .panel { padding:18px 16px; border-radius:14px; margin-bottom:14px; }
  .start-heading { display:block; }
  .grid-start { grid-template-columns:1fr; }
  #startBtn { width:100%; }
  .row { gap:12px; }
  .row > div { min-width:min(100%,220px); }
  .crawl-item { align-items:flex-start; flex-wrap:wrap; }
  .crawl-item .meta { flex-basis:100%; margin-left:36px; text-align:left; }
  .exports { width:100%; margin-left:0; }
  .exports button { flex:1 1 auto; }
  .toolbar > * { width:100%!important; }
  .cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .card { border-bottom:1px solid var(--line); }
  .tablewrap { max-height:58vh; }
  .audit-form { grid-template-columns:1fr; }
  .audit-form button { width:100%; }
  .audit-next { align-items:stretch; flex-direction:column; gap:14px; }
  .audit-next button { width:100%; min-width:0; }
  .audit-secondary > summary { width:auto; }
  .audit-secondary-actions { align-items:stretch; flex-direction:column; }
  .audit-secondary-actions > * { width:100%; }
  .audit-list { grid-template-columns:minmax(0,1fr); }
  .workspace-tabs button { min-width:auto; }
  .project-toolbar > div,.project-toolbar select { width:100%; min-width:100%; }
  .projects-registry-head,.project-create-head { flex-wrap:wrap; }
  .projects-registry-head button { width:100%; }
  .project-create-grid,.presale-grid { grid-template-columns:1fr; }
  .project-create-grid .span-2 { grid-column:auto; }
  .project-team-detail { grid-template-columns:1fr; }
  .presale-summary-head { padding:14px; }
  .presale-grid { gap:10px; padding:12px; }
  .presale-card { min-height:0; }
  .presale-card-actions button { flex:1 1 auto; }
  .audit-settings-grid { grid-template-columns:1fr; }
  .audit-brief-grid { grid-template-columns:1fr; }
  .audit-draft-status { align-items:flex-start; flex-direction:column; }
  .profile-grid { grid-template-columns:1fr 1fr; }
  .profile-fact:nth-child(2) { border-right:0; }
  .profile-fact:nth-child(-n+2) { border-bottom:1px solid var(--line); }
.audit-steps { grid-template-columns:repeat(2,1fr); }
  .audit-step:nth-child(2) { border-right:0; }
  .audit-step:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric-field:nth-child(6n) { border-right:1px solid var(--line); }
  .metric-field:nth-child(2n) { border-right:0; }
  .project-profile-head { flex-wrap:wrap; }
  .project-profile-head button { width:100%; margin-left:0; }
  .competitor-add { grid-template-columns:1fr; }
  .estimate-head { flex-wrap:wrap; }
  .estimate-head .ghost { margin-left:0; }
  .estimate-controls { grid-template-columns:1fr; }
  .estimate-controls button { width:100%; }
  .work-plan-settings { grid-template-columns:1fr; }
  .work-plan-history { align-items:stretch; flex-direction:column; }
  .work-plan-history-select { width:100%; flex-basis:auto; }
  .plan-sync-bar { align-items:stretch; flex-direction:column; gap:10px; }
  .plan-sync-actions { justify-content:flex-start; }
  .plan-sync-preview { flex-direction:column; }
  .sheet-sync-dialog { width:100vw; max-width:none; max-height:100dvh; height:100dvh; border:0; border-radius:0; }
  .sheet-sync-shell { grid-template-columns:1fr; min-height:100dvh; }
  .sheet-sync-list-pane { max-height:42dvh; border-right:0; border-bottom:1px solid var(--line); }
  .sheet-sync-editor { padding:20px; }
  .sheet-sync-empty { min-height:240px; }
  .sheet-sync-form-grid { grid-template-columns:1fr; }
  .sheet-sync-form-grid .span-2 { grid-column:auto; }
  .sheet-sync-preview-row { grid-template-columns:1fr; gap:3px; }
  .work-plan-actions button { width:100%; }
  .report-connect-grid,.report-source-grid,.report-layout { grid-template-columns:1fr; }
  .report-connect-topvisor,.report-connect-actions { grid-column:1; }
  .report-connect-actions { justify-content:flex-start; }
  .report-connect-topvisor { grid-column:auto; }
  .report-connect-grid > button { grid-column:auto; width:100%; }
  .report-source-grid > button { width:100%; margin-top:0; }
  .report-chart-head { display:block; }
  .report-chart-legend { justify-content:flex-start; margin-top:9px; }
  .report-chart { padding:12px; }
  .report-chart-hint { display:block; }
  .report-share-row { grid-template-columns:minmax(0,1fr) 74px; gap:7px 10px; }
  .report-share-track { grid-column:1 / -1; grid-row:2; }
  .report-share-value { grid-column:2; grid-row:1; }
  .report-comparison-row { grid-template-columns:minmax(0,1fr) auto; gap:8px 10px; }
  .report-comparison-lines { grid-column:1 / -1; grid-row:2; }
  .report-kpi-grid { grid-template-columns:1fr 1fr; }
  .report-kpi-grid.three,.report-note-grid,.report-donut-layout,.external-entry-row { grid-template-columns:1fr; }
  .external-entry-row .span-2,.external-entry-row-head { grid-column:1; }
  .monthly-entry-row { grid-template-columns:1fr 40px; }
  .monthly-entry-row input { grid-column:1 / -1; grid-row:2; }
  .monthly-entry-row.names-only input { grid-column:1; grid-row:1; }
  .monthly-entry-remove { grid-column:2; grid-row:1; }
  .report-form-grid { grid-template-columns:1fr; }
  .report-form-grid .span-2 { grid-column:auto; }
  .report-editor-head { display:block; }
  .report-editor-actions { margin-top:12px; }
  .report-analysis-item { grid-template-columns:1fr; gap:4px; }
  .grown-queries-wrap { overflow:visible; }
  .grown-queries-table { min-width:0; }
  .grown-queries-table thead { display:none; }
  .grown-queries-table tbody,.grown-queries-table tr,.grown-queries-table td { display:block; width:100%; }
  .grown-queries-table tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; padding:13px 12px; border-bottom:1px solid var(--line); }
  .grown-queries-table tr:last-child { border-bottom:0; }
  .grown-queries-table td { padding:0; border:0; }
  .grown-queries-table td:nth-child(1),.grown-queries-table td:nth-child(2),.grown-queries-table td:nth-child(6) { grid-column:1 / -1; }
  .grown-queries-table td::before { content:attr(data-label); display:block; margin-bottom:3px; color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; }
  .report-summary-fields { grid-template-columns:1fr; }
  .report-landing-grid { grid-template-columns:1fr; }
  .report-summary-fields .span-2 { grid-column:auto; }
  .report-plan-progress { grid-template-columns:1fr auto; }
  .report-plan-track { grid-column:1 / -1; grid-row:2; }
  .service-hero { min-height:0; padding:24px 20px; border-radius:15px; }
  .service-hero::before { top:-94px; right:-180px; width:310px; height:310px; }
  .service-hero h1,.service-hero .start-heading h2 { font-size:27px; line-height:1.12; }
  .service-hero .service-hero-description,.service-hero > p,.service-hero .start-heading .panel-intro { margin:12px 0 20px; font-size:15px; }
  .ai-hero { min-height:0; }
  .ai-create-grid,.ai-settings-grid,.ai-breakdown,.ai-metric-grid { grid-template-columns:1fr; }
  .ai-run-strip { grid-template-columns:1fr; }
  .ai-share-controls { grid-template-columns:1fr 1fr; }
  .ai-share-controls input { grid-column:1 / -1; }
  .ai-prompt-summary { grid-template-columns:1fr; }
  .ai-prompt-state { justify-content:space-between; }
  .ai-prompt-builder-grid { grid-template-columns:1fr 1fr; }
  .ai-competitor-head { display:block; }
  .ai-competitor-sample { display:block; margin-top:7px; }
  .ai-competitor-row { grid-template-columns:minmax(0,1fr) 80px; gap:7px 10px; }
  .ai-competitor-track { grid-column:1 / -1; grid-row:2; }
  .ai-span-2 { grid-column:auto; }
}

@media (max-width:600px) {
  .wordmark { display:none; }
  .mode-switch { width:100%; justify-content:space-between; }
  .mode-switch button { padding-inline:8px; white-space:nowrap; }
  .ai-prompt-builder-grid { grid-template-columns:1fr; }
  .ai-suggestion { grid-template-columns:22px minmax(0,1fr) 36px; }
  .ai-suggestion-group { grid-column:2; }
  .ai-suggestion-text { grid-column:2; }
  .ai-suggestion-score { grid-column:3; grid-row:1; }
  .report-editor { padding:13px 10px; }
  .report-block { padding:14px 10px; }
  .report-chart { margin-inline:-2px; padding:10px; }
  .report-chart-scroll > svg { min-width:520px; }
  .report-chart[data-chart-density="dense"] .report-chart-scroll > svg { min-width:700px; }
  .report-chart-legend-item { min-height:38px; }
}

@media (max-width:420px) {
  .business-unit-switch button { padding-inline:7px; font-size:11px; }
  .header-inner { gap:8px; padding-inline:12px; }
  .wordmark { display:none; }
  .mode-switch { width:100%; gap:1px; justify-content:space-between; }
  .mode-switch button { padding-inline:6px; font-size:11px; white-space:nowrap; }
  .audit-list { grid-template-columns:minmax(0,1fr); }
}

.auth-gate {
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  grid-template-columns:minmax(320px,1.15fr) minmax(380px,.85fr);
  min-height:100dvh;
  overflow-y:auto;
  background:var(--dark);
  color:#F8F1E8;
}
.auth-gate.hidden { display:none; }
.auth-story {
  position:relative;
  overflow:hidden;
  padding:clamp(42px,7vw,110px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:
    radial-gradient(circle at 72% 22%,rgba(242,78,46,.3),transparent 26%),
    linear-gradient(145deg,#1B1713 12%,#282019 100%);
}
.auth-story::after {
  content:'';
  position:absolute;
  width:min(56vw,720px);
  aspect-ratio:1;
  right:-22%;
  bottom:-38%;
  border:1px solid rgba(255,255,255,.13);
  border-radius:50%;
  box-shadow:0 0 0 90px rgba(255,255,255,.025),0 0 0 180px rgba(255,255,255,.018);
}
.auth-mark { position:relative; z-index:1; font-family:var(--font-display); font-size:18px; font-weight:800; }
.auth-copy { position:relative; z-index:1; max-width:760px; }
.auth-copy .eyebrow { color:#F78A71; font-size:12px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.auth-copy h1 { margin:18px 0 24px; font-family:var(--font-display); font-size:clamp(38px,5vw,76px); line-height:1.03; letter-spacing:-.055em; }
.auth-copy p { max-width:620px; margin:0; color:#CFC5B8; font-size:clamp(15px,1.4vw,19px); }
.auth-form-side { display:grid; place-items:center; padding:32px; background:#F6EFE6; color:var(--ink); }
.auth-card { width:min(100%,440px); }
.auth-card h2 { margin:0 0 8px; font-size:28px; letter-spacing:-.045em; }
.auth-card > p { margin:0 0 30px; color:var(--muted); }
.auth-card label { margin-top:16px; }
.auth-card input { min-height:50px; background:#fff; }
.auth-card button { width:100%; min-height:50px; margin-top:22px; }
.auth-error { min-height:22px; margin-top:14px; color:var(--err); font-size:13px; }
.auth-setup-note { margin-top:24px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; color:var(--muted); font-size:12px; background:rgba(255,255,255,.5); }
.account-actions { position:relative; display:flex; align-items:center; }
.header-account {
  display:grid;
  place-items:center;
  width:36px;
  min-height:36px;
  padding:0;
  border:1px solid rgba(255,255,255,.14);
  border-radius:50%;
  background:rgba(255,255,255,.06);
  color:#F3ECE2;
  box-shadow:none;
}
.header-account:hover { background:rgba(255,255,255,.12); }
.account-avatar { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--brand); color:#fff; font-size:12px; font-weight:700; }
.account-menu {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:30;
  width:240px;
  padding:8px;
  border:0;
  border-radius:12px;
  background:#fff;
  color:var(--ink);
  box-shadow:0 8px 24px rgba(20,17,14,.18);
}
.account-menu.hidden { display:none; }
.account-identity { padding:10px 11px 12px; border-bottom:1px solid var(--line); margin-bottom:5px; }
.account-identity strong,.account-identity span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-identity strong { font-size:14px; }
.account-identity span { margin-top:2px; color:var(--muted); font-size:12px; }
.account-menu button {
  width:100%;
  min-height:38px;
  padding:8px 11px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--ink);
  box-shadow:none;
  text-align:left;
  font-size:13px;
}
.account-menu button:hover { background:var(--sunken); }
.account-menu .logout-action { color:var(--err); }
.team-dialog {
  width:min(1120px,calc(100vw - 32px));
  max-height:calc(100dvh - 40px);
  padding:0;
  border:1px solid var(--line);
  border-radius:20px;
  background:var(--bg);
  color:var(--ink);
  box-shadow:0 30px 100px rgba(20,17,14,.35);
}
.team-dialog::backdrop { background:rgba(20,17,14,.72); backdrop-filter:blur(5px); }
.team-shell { display:grid; grid-template-columns:330px minmax(0,1fr); min-height:620px; }
.team-list-pane { padding:24px; border-right:1px solid var(--line); background:var(--sunken); }
.team-pane-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.team-pane-head h2 { margin:0; font-size:21px; }
.team-user-list { display:grid; gap:8px; }
.team-user-item { width:100%; padding:12px; text-align:left; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--ink); box-shadow:none; }
.team-user-item:hover,.team-user-item.active { border-color:var(--line-strong); background:#fff; }
.team-user-item strong,.team-user-item span { display:block; }
.team-user-item span { color:var(--muted); font-size:12px; }
.team-user-item.inactive { opacity:.55; }
.team-editor { padding:28px; overflow:auto; }
.team-editor-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:22px; }
.team-editor-head h2 { margin:0 0 4px; }
.team-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.team-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:8px; }
.team-check { display:flex; align-items:flex-start; gap:9px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:13px; }
.team-check input { width:auto; margin-top:3px; }
.team-section { margin-top:22px; }
.team-section h3 { margin:0 0 4px; font-size:15px; }
.team-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:26px; padding-top:18px; border-top:1px solid var(--line); }
.sheet-sync-dialog { width:min(1240px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:0; border:1px solid var(--line); border-radius:20px; background:var(--bg); color:var(--ink); box-shadow:0 30px 100px rgba(20,17,14,.35); }
.sheet-sync-dialog::backdrop { background:rgba(20,17,14,.72); backdrop-filter:blur(5px); }
.sheet-sync-shell { display:grid; grid-template-columns:360px minmax(0,1fr); min-height:min(760px,calc(100dvh - 42px)); }
.sheet-sync-list-pane { padding:22px; border-right:1px solid var(--line); background:var(--sunken); overflow:auto; }
.sheet-sync-list-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:18px; }
.sheet-sync-list-head h2 { margin:0; font-size:20px; }
.sheet-sync-list-head p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.sheet-sync-list { display:grid; gap:3px; margin-top:14px; }
.sheet-sync-list-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; width:100%; min-height:62px; padding:10px 11px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--ink); text-align:left; box-shadow:none; }
.sheet-sync-list-item:hover,.sheet-sync-list-item.active { border-color:var(--line-strong); background:#fff; }
.sheet-sync-list-item strong,.sheet-sync-list-item small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sheet-sync-list-item strong { font-size:12px; }
.sheet-sync-list-item small { grid-column:1; color:var(--muted); font-size:10px; }
.sheet-sync-list-item .sync-state { grid-column:2; grid-row:1 / span 2; align-self:center; }
.sheet-sync-editor { padding:28px; overflow:auto; }
.sheet-sync-empty { display:grid; align-content:center; min-height:560px; max-width:56ch; }
.sheet-sync-empty.hidden { display:none; }
.sheet-sync-empty h2 { margin:0; font-size:24px; }
.sheet-sync-empty p { margin:8px 0 0; color:var(--muted); }
.sheet-sync-editor-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:24px; }
.sheet-sync-editor-head h2 { margin:0 0 4px; font-size:23px; }
.sheet-sync-editor-head a { color:var(--brand-ink); font-size:12px; text-underline-offset:3px; }
.sheet-sync-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.sheet-sync-form-grid .span-2 { grid-column:1 / -1; }
.sheet-sync-access { display:flex; align-items:flex-start; gap:14px; margin-top:20px; padding:14px 0; border-block:1px solid var(--line); }
.sheet-sync-access strong { flex:0 0 150px; font-size:12px; }
.sheet-sync-access span { color:var(--muted); font-size:12px; }
.sheet-sync-preview { margin-top:18px; }
.sheet-sync-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:10px; }
.sheet-sync-preview-head strong { display:block; font-size:15px; }
.sheet-sync-preview-head span { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.sheet-sync-preview-list { max-height:300px; overflow:auto; border-block:1px solid var(--line); }
.sheet-sync-preview-row { display:grid; grid-template-columns:minmax(0,1fr) 130px 150px; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:11px; }
.sheet-sync-preview-row:last-child { border-bottom:0; }
.sheet-sync-preview-row strong { font-size:12px; }
.sheet-sync-preview-row span { color:var(--muted); }
.sheet-sync-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; padding-top:18px; border-top:1px solid var(--line); }
.sync-state { display:inline-flex; align-items:center; gap:6px; min-height:26px; padding:4px 9px; border-radius:999px; background:var(--sunken); color:var(--muted); font-size:10px; font-weight:700; white-space:nowrap; }
.sync-state::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; }
.sync-state.read_only,.sync-state.synced { background:var(--ok-bg); color:var(--ok); }
.sync-state.needs_review,.sync-state.structure_changed { background:var(--warn-bg); color:var(--warn); }
.sync-state.access_error,.sync-state.conflict { background:var(--err-bg); color:var(--err); }
.dashboard-head { display:flex; align-items:end; justify-content:space-between; gap:24px; }
/* Light page header shared by work screens (Моя работа, Проекты, Сервисы, Начисления). */
.dashboard-head h1,.projects-registry-head h1,.services-hero h1 { margin:0; font-family:var(--font-ui); font-size:30px; line-height:1.15; letter-spacing:-.035em; }
.dashboard-controls { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.dashboard-controls label { margin-bottom:4px; }
/* KPI tiles double as shortcuts: each one opens its list below. */
.dashboard-progress { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:22px; }
.dashboard-progress:empty { display:none; }
.dashboard-kpi { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; min-height:0; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); box-shadow:none; color:var(--ink); text-align:left; }
.dashboard-kpi:hover { border-color:var(--line-strong); background:var(--bg); transform:none; }
.dashboard-kpi.active { border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); }
.dashboard-kpi span { max-width:100%; overflow:hidden; color:var(--muted); font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-kpi strong { font-size:26px; line-height:1.15; font-variant-numeric:tabular-nums; letter-spacing:-.03em; }
.dashboard-kpi strong small { color:var(--muted); font-size:15px; font-weight:600; letter-spacing:0; }
.dashboard-kpi > small { color:var(--muted); font-size:11px; font-weight:600; }
.dashboard-kpi[data-tone="overdue"] { border-color:#F0C9C1; background:var(--overdue-bg); }
.dashboard-kpi[data-tone="overdue"] strong { color:var(--err); }
.dashboard-kpi[data-tone="approval"] { border-color:#EED9AE; background:var(--approval-bg); }
.dashboard-kpi[data-tone="approval"] strong { color:var(--approval-ink); }
.dashboard-kpi[data-tone="overdue"].active { border-color:var(--err); box-shadow:inset 0 0 0 1px var(--err); }
.dashboard-kpi[data-tone="approval"].active { border-color:var(--approval-line); box-shadow:inset 0 0 0 1px var(--approval-line); }
.dashboard-stack { display:grid; gap:20px; }
.dashboard-workspace { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,.8fr); gap:20px; align-items:start; }
.dashboard-side { display:grid; gap:20px; min-width:0; }
.dashboard-side .panel { margin-bottom:0; }
.dashboard-team-list { display:grid; gap:2px; margin:0 -10px; }
.dashboard-team-row { display:grid; gap:2px; width:100%; min-height:0; padding:10px; border:0; border-radius:10px; background:transparent; box-shadow:none; color:var(--ink); text-align:left; }
.dashboard-team-row:hover { background:var(--sunken); transform:none; }
.dashboard-team-row.active { background:var(--ink); color:#fff; }
.dashboard-team-row.active > span { color:#CFC5B8; }
.dashboard-team-row strong { font-size:14px; }
.dashboard-team-row > span { color:var(--muted); font-size:12px; }
.dashboard-team-row .dashboard-team-flags { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
.dashboard-team-flags em,.dashboard-project-risk span { padding:3px 7px; border-radius:999px; background:var(--sunken); color:var(--ink-soft); font-size:10px; font-style:normal; font-weight:700; line-height:1.4; }
.dashboard-team-flags em[data-tone="overdue"] { background:var(--err-bg); color:var(--err); }
.dashboard-team-flags em[data-tone="approval"] { background:var(--warn-bg); color:var(--approval-ink); }
.dashboard-assignee-filter { display:flex; flex-wrap:wrap; align-items:center; gap:10px; width:100%; padding:8px 8px 8px 14px; border-radius:12px; background:var(--sunken); font-size:13px; }
.dashboard-assignee-filter span { flex:1; min-width:180px; }
.dashboard-assignee-filter button { min-height:32px; padding:4px 12px; font-size:12px; }
.dashboard-task-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-width:0; }
.dashboard-task-actions .dashboard-task-status { width:200px; }
.dashboard-task-quick { flex:0 0 auto; min-height:38px; padding:6px 14px; border:0; border-radius:999px; background:var(--ink); color:#fff; font-size:12px; box-shadow:none; }
.dashboard-task-quick:hover { background:#000; }
.dashboard-focus-panel { min-width:0; }
.dashboard-tabs { display:flex; flex:0 0 auto; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; width:max-content; max-width:100%; gap:3px; padding:4px; border-radius:12px; background:var(--sunken); }
.dashboard-tabs button { flex:0 0 auto; min-height:36px; padding:6px 11px; border:0; color:var(--muted); background:transparent; box-shadow:none; font-size:13px; }
.dashboard-tabs button:hover { background:rgba(255,255,255,.6); color:var(--ink); }
/* Period and state filters are two segmented controls that wrap as whole groups. */
.dashboard-filters { display:flex; flex:1 1 100%; flex-wrap:wrap; gap:8px; width:100%; min-width:0; }
.dashboard-tabs button.active { color:var(--ink); background:#fff; box-shadow:0 1px 5px rgba(26,23,20,.1); }
.dashboard-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.dashboard-focus-panel .dashboard-section-head { flex-wrap:wrap; }
.dashboard-focus-panel .dashboard-section-head > div:first-child { flex:1 1 260px; min-width:0; }
#dashboardTaskSummary { min-height:3em; }
.dashboard-task-list { display:grid; gap:24px; }
.dashboard-task-group { min-width:0; }
.dashboard-task-group h3 { margin:0; padding:0 0 9px; border-bottom:1px solid var(--line-strong); font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.dashboard-task { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto 44px; gap:14px; align-items:center; min-height:70px; padding:10px 12px 10px 14px; border-bottom:1px solid var(--line); border-radius:10px; }
.dashboard-task[data-attention="true"] { margin:4px 0; border-bottom-color:transparent; background:var(--overdue-bg); box-shadow:inset 3px 0 0 var(--err); }
.dashboard-task[data-attention-tone="approval"] { background:var(--approval-bg); box-shadow:inset 3px 0 0 var(--approval-line); }
.dashboard-task-main .dashboard-task-context { margin:0 0 2px; overflow:hidden; color:var(--muted); font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-task-main strong,.dashboard-task-main span { display:block; }
.dashboard-task-main span { margin-top:3px; color:var(--muted); font-size:12px; }
.dashboard-task-main .dashboard-task-alerts { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.dashboard-task-main .dashboard-task-alert { display:inline-flex; align-items:center; width:max-content; max-width:100%; margin-top:0; padding:3px 8px; border:0; border-radius:999px; background:var(--err-bg); color:var(--err); font-size:10px; font-weight:700; line-height:1.35; }
.dashboard-task-main .dashboard-task-alert.is-approval { background:var(--warn-bg); color:var(--approval-ink); }
.dashboard-task-open { display:block; width:100%; min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--ink); text-align:left; }
.dashboard-task-open:hover { transform:none; color:var(--brand-d); background:transparent; }
.dashboard-task-open strong { line-height:1.35; text-wrap:pretty; }
.dashboard-task-status { width:100%; min-height:38px; padding:7px 30px 7px 10px; border-color:var(--line); border-radius:10px; background-color:#fff; font-size:12px; }
.dashboard-task-link { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:10px; color:var(--ink); text-decoration:none; }
.dashboard-task-link:hover { border-color:var(--line-strong); background:var(--sunken); }
.dashboard-project-list { display:grid; grid-template-columns:1fr; }
.finance-list { display:grid; gap:9px; }
.dashboard-project { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; align-items:baseline; padding:10px 0; border-bottom:1px solid var(--line); }
.dashboard-project:last-child { border-bottom:0; }
.dashboard-project-meta,.dashboard-project-risk { grid-column:1 / -1; }
.dashboard-project strong,.dashboard-project > span { display:block; }
.dashboard-project > span { color:var(--muted); font-size:12px; }
.dashboard-project a { white-space:nowrap; color:var(--ink); font-size:12px; font-weight:700; text-decoration:none; }
.dashboard-project a::after { content:' →'; }
.dashboard-project a:hover { color:var(--brand-d); }
.dashboard-project-risk { display:flex; gap:5px; flex-wrap:wrap; margin:2px 0 4px; }
.dashboard-project-risk span[data-tone="overdue"] { background:var(--err-bg); color:var(--err); }
.dashboard-project-risk span[data-tone="approval"] { background:var(--warn-bg); color:var(--approval-ink); }
.dashboard-project-progress { grid-column:1 / -1; height:4px; overflow:hidden; border-radius:999px; background:var(--sunken); }
.dashboard-project-progress i { display:block; height:100%; border-radius:inherit; background:var(--brand); }
.dashboard-empty { display:grid; gap:6px; padding:28px 0 8px; }
.dashboard-empty strong,.dashboard-empty span { display:block; }
.dashboard-empty span { color:var(--muted); }
.finance-row { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:14px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.finance-row input { text-align:right; }
.finance-total { display:flex; justify-content:space-between; gap:16px; padding-top:16px; font-size:18px; font-weight:700; }
@media (max-width:800px) {
  .auth-gate { grid-template-columns:1fr; }
  .auth-story { min-height:250px; padding:34px 26px; }
  .auth-copy h1 { font-size:36px; margin-block:12px; }
  .auth-copy p { display:none; }
  .auth-form-side { place-items:start center; padding:28px 22px 50px; }
  .team-shell { grid-template-columns:1fr; }
  .team-list-pane { border-right:0; border-bottom:1px solid var(--line); }
  .team-grid,.team-checks { grid-template-columns:1fr; }
  .dashboard-head { align-items:stretch; flex-direction:column; }
  .dashboard-controls { display:grid; grid-template-columns:1fr; }
  .dashboard-progress { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-hero .dashboard-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-controls > div { min-width:0; }
  .dashboard-controls input,.dashboard-controls select { width:100%; min-width:0; }
  .dashboard-hero .dashboard-controls > div:last-child:nth-child(odd) { grid-column:1 / -1; }
  .dashboard-workspace { grid-template-columns:1fr; }
  .dashboard-project-list { grid-template-columns:1fr; }
  .dashboard-task { grid-template-columns:minmax(0,1fr) 44px; gap:8px 12px; padding:13px 0; background:none!important; }
  .dashboard-task[data-attention="true"] { padding-left:14px; }
  .dashboard-task-main { grid-column:1; }
  .dashboard-task-actions { grid-column:1; justify-content:flex-start; flex-wrap:wrap; }
  .dashboard-task-actions .dashboard-task-status { width:min(100%,220px); }
  .dashboard-task-link { grid-column:2; grid-row:1 / span 3; }
  .dashboard-section-head { align-items:flex-start; flex-direction:column; }
  .dashboard-focus-panel .dashboard-section-head > div:first-child { flex:none; width:100%; }
  .dashboard-tabs { flex-wrap:nowrap; width:100%; overflow-x:auto; scrollbar-width:none; }
  .dashboard-tabs button { flex:0 0 auto; min-height:40px; }
}

/* SEO-лаборатория: проектная оболочка */
.sidebar-toggle { display:none; width:44px; min-height:44px; padding:10px; border:0; background:transparent; color:#F3ECE2; }
.sidebar-toggle:hover { background:rgba(255,255,255,.08); }
.sidebar-toggle svg,.app-sidebar svg,.icon-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.header-context { padding-left:16px; border-left:1px solid rgba(255,255,255,.18); color:#CFC5B8; font-size:13px; }
.account-actions { margin-left:auto; }
.app-shell { display:grid; grid-template-columns:248px minmax(0,1fr); width:var(--shell-width); max-width:100%; margin:0 auto; }
.app-sidebar { position:sticky; top:60px; align-self:start; height:calc(100dvh - 60px); padding:24px 16px 20px; border-right:1px solid var(--line); background:rgba(250,246,240,.94); overflow-y:auto; z-index:15; }
.sidebar-product { display:flex; flex-direction:column; padding:0 10px 18px; }
.sidebar-product strong { font-size:13px; letter-spacing:-.01em; }
.sidebar-product span { color:var(--muted); font-size:11px; }
.sidebar-nav { display:grid; gap:4px; }
.sidebar-nav button { display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:9px 11px; border:0; border-radius:10px; background:transparent; color:var(--ink-soft); text-align:left; font-size:13px; font-weight:600; }
.sidebar-nav button:hover { background:var(--sunken); color:var(--ink); }
.sidebar-nav button.active { background:var(--ink); color:#fff; }
.sidebar-nav button svg { flex:0 0 20px; }
.sidebar-service-links { display:grid; gap:2px; margin:-1px 0 6px 30px; padding:4px 0 4px 12px; border-left:1px solid var(--line-strong); }
.sidebar-service-links button { min-height:36px; padding:6px 10px; color:var(--muted); font-size:12px; }
.sidebar-service-links button.active { background:var(--brand-tint); color:var(--brand-ink); }
/* Without any available service the indented list would show only its left rule. */
.sidebar-service-links:not(:has(button:not(.hidden))) { display:none; }
/* When a service is open, its link carries the highlight; the parent only marks the group. */
.sidebar-nav button.active:has(+ .sidebar-service-links button.active) { background:transparent; color:var(--ink); }
.sidebar-projects { margin-top:26px; padding-top:18px; border-top:1px solid var(--line); }
.sidebar-section-title { display:flex; justify-content:space-between; padding:8px 10px 5px; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.sidebar-project-list { display:grid; gap:2px; margin-bottom:12px; }
.sidebar-project-link { display:block; width:100%; padding:7px 10px; border-radius:8px; color:var(--ink-soft); font-size:12px; line-height:1.3; text-decoration:none; overflow-wrap:anywhere; }
.sidebar-project-link:hover,.sidebar-project-link.active { background:var(--sunken); color:var(--ink); }
.sidebar-project-link span { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.sidebar-empty { padding:6px 10px; color:var(--muted); font-size:11px; }
.app-shell > .wrap { width:100%; min-width:0; padding:28px 32px; }
.sidebar-backdrop { position:fixed; inset:60px 0 0; z-index:14; background:rgba(20,17,14,.5); }

.services-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.services-hero p { max-width:62ch; margin:7px 0 0; color:var(--muted); font-size:14px; }
.services-access-summary { flex:0 0 auto; padding:6px 10px; border-radius:999px; background:var(--sunken); color:var(--ink-soft); font-size:12px; font-weight:600; }
.service-catalog { display:grid; gap:12px; }
.service-row { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:18px; min-height:122px; padding:22px 24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow-panel); }
.service-row:hover { border-color:var(--line-strong); }
.service-glyph { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:var(--sunken); color:var(--ink); }
.service-glyph svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.service-copy { min-width:0; }
.service-copy h2 { margin:0 0 5px; font-size:19px; }
.service-copy p { max-width:68ch; margin:0; color:var(--muted); font-size:13px; }
.service-meta { display:flex; align-items:center; gap:10px; }
.service-status { display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-radius:999px; background:var(--ok-bg); color:var(--ok); font-size:11px; font-weight:700; }
.service-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.service-status.off { background:var(--sunken); color:var(--muted); }
.service-row.unavailable { opacity:.68; }
.service-row.unavailable .service-glyph { background:var(--sunken); color:var(--muted); }

.semantic-hero { min-height:0; }
.semantic-launch-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; max-width:980px; }
.semantic-project-row { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(170px,.7fr) minmax(120px,.45fr); gap:12px; max-width:980px; margin-bottom:16px; }
.semantic-hero textarea { min-height:118px; }
.semantic-help { margin-top:7px; color:#BEB2A4; font-size:11px; line-height:1.45; }
.semantic-advanced-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; max-width:980px; }
.semantic-advanced-grid .span-2 { grid-column:1 / -1; }
.semantic-number-row { display:grid; grid-template-columns:repeat(2,minmax(0,180px)); gap:12px; }
.semantic-launch-actions { display:flex; align-items:center; gap:12px; margin-top:20px; }
.semantic-launch-actions button { min-height:46px; box-shadow:var(--shadow-accent); }
.semantic-integration { color:#CFC5B8; font-size:12px; }
.semantic-workspace { display:grid; grid-template-columns:minmax(280px,.7fr) minmax(0,1.3fr); gap:20px; align-items:start; }
.semantic-history { display:grid; gap:0; }
.semantic-history-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; width:100%; min-height:72px; padding:13px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; color:var(--ink); text-align:left; }
.semantic-history-row:hover { background:var(--sunken); }
.semantic-history-row strong,.semantic-history-row span { display:block; }
.semantic-history-row .semantic-run-meta { margin-top:4px; color:var(--muted); font-size:11px; }
.semantic-history-empty { padding:22px 0; color:var(--muted); font-size:13px; }
.semantic-result-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.semantic-result-head h2 { margin-bottom:5px; }
.semantic-result-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.semantic-result-actions a { display:inline-flex; align-items:center; min-height:38px; padding:7px 14px; border:1px solid var(--line-strong); border-radius:999px; background:#fff; color:var(--ink); font-size:12px; font-weight:650; text-decoration:none; }
.semantic-result-actions a:hover { background:var(--sunken); }
.semantic-quality-note { margin:16px 0; padding:13px 0; border-block:1px solid var(--line); color:var(--muted); font-size:12px; }
.semantic-query { max-width:360px; font-weight:600; }
.semantic-cluster { color:var(--muted); }
.semantic-status-copy { display:grid; gap:5px; padding:24px 0; }
.semantic-status-copy strong { font-size:17px; }

.project-title-row { display:flex; align-items:center; gap:8px; }
.icon-button { display:inline-grid; place-items:center; width:42px; min-height:42px; padding:0; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); }
.icon-button:hover { background:var(--sunken); }
.icon-button[aria-pressed="true"] { border-color:#E9A18F; background:var(--brand-tint); color:var(--brand-ink); }
.project-services { display:grid; gap:12px; }
.project-service-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px; padding:20px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.project-service-row h3 { margin:0 0 5px; font-size:17px; }
.project-service-row p { margin:0; color:var(--muted); font-size:13px; }
.project-service-actions { display:flex; align-items:center; gap:10px; }

.work-plan-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:14px 0; }
.view-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); }
.view-switch button { min-height:36px; padding:6px 12px; border-radius:9px; background:transparent; color:var(--ink-soft); font-size:12px; }
.view-switch button.active { background:#fff; color:var(--ink); box-shadow:0 1px 4px rgba(26,23,20,.1); }
.plan-name-wrap { display:grid; grid-template-columns:minmax(0,1fr) 38px; gap:6px; align-items:start; }
.plan-open-task { width:38px; min-height:38px; padding:0; border-radius:10px; background:var(--sunken); color:var(--ink); }
.plan-board { display:grid; grid-template-columns:repeat(4,minmax(220px,1fr)); gap:12px; overflow-x:auto; padding:2px 2px 8px; }
.plan-column { min-width:240px; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--sunken); }
.plan-column-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.plan-column-head strong { font-size:12px; }
.plan-column-head span { display:grid; place-items:center; min-width:24px; height:24px; padding:0 7px; border-radius:999px; background:#fff; color:var(--muted); font-size:11px; }
.plan-column-body { display:grid; gap:8px; }
.plan-card { width:100%; min-height:0; padding:13px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--ink); text-align:left; box-shadow:0 2px 8px rgba(26,23,20,.05); }
.plan-card:hover { border-color:#E9A18F; background:#fff; }
.plan-card strong { display:block; margin-bottom:8px; font-size:13px; line-height:1.35; }
.plan-card-meta { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; font-weight:500; }
.plan-priority { display:inline-block; margin-bottom:6px; color:var(--brand-ink); font-size:10px; font-weight:700; text-transform:uppercase; }
.plan-column-empty { padding:16px 8px; color:var(--muted); font-size:11px; text-align:center; }

.drawer-backdrop { position:fixed; inset:0; z-index:90; background:rgba(20,17,14,.52); }
.task-drawer { position:fixed; top:0; right:0; z-index:100; display:flex; flex-direction:column; width:min(520px,100%); height:100dvh; border-left:1px solid var(--line); background:var(--panel); box-shadow:none; visibility:hidden; transform:translateX(102%); transition:transform 220ms var(--ease),box-shadow 220ms var(--ease),visibility 0s linear 220ms; }
.task-drawer.open { visibility:visible; box-shadow:-20px 0 50px rgba(20,17,14,.18); transform:translateX(0); transition:transform 220ms var(--ease),box-shadow 220ms var(--ease); }
.task-drawer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:22px 24px; border-bottom:1px solid var(--line); }
.task-drawer-head h2 { margin:3px 0 0; font-size:21px; }
.task-drawer-body { display:grid; gap:18px; padding:24px; overflow-y:auto; }
.task-drawer-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.task-history { padding-top:16px; border-top:1px solid var(--line); }
.task-history h3 { margin:0 0 8px; font-size:14px; }
.task-drawer-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:auto; padding:16px 24px calc(16px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:#fff; }
body.drawer-open { overflow:hidden; }

@media (max-width:1024px) {
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { position:fixed; top:60px; bottom:0; left:0; width:min(300px,86vw); height:auto; visibility:hidden; transform:translateX(-102%); transition:transform 220ms var(--ease),visibility 0s linear 220ms; }
  .app-sidebar.open { visibility:visible; box-shadow:20px 0 40px rgba(20,17,14,.18); transform:translateX(0); transition:transform 220ms var(--ease); }
  .sidebar-toggle { display:inline-grid; place-items:center; }
  .header-context { display:none; }
  .app-shell > .wrap { padding:24px; }
  .semantic-workspace { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .header-inner { padding-inline:14px; }
  .wordmark { display:inline-flex; font-size:13px; }
  .app-shell > .wrap { padding:16px; }
  .services-hero { align-items:flex-start; flex-direction:column; }
  .service-row,.project-service-row { grid-template-columns:1fr; }
  .service-glyph { width:42px; height:42px; }
  .service-meta,.project-service-actions { justify-content:space-between; }
  .plan-board { grid-template-columns:repeat(4,82vw); margin-inline:-2px; }
  .work-plan-toolbar { align-items:stretch; flex-direction:column; }
  .view-switch { width:100%; }
  .view-switch button { flex:1; }
  .task-drawer-grid { grid-template-columns:1fr; }
  .semantic-project-row,.semantic-launch-grid,.semantic-advanced-grid { grid-template-columns:1fr; }
  .semantic-advanced-grid .span-2 { grid-column:auto; }
  .semantic-number-row { grid-template-columns:1fr 1fr; }
  .semantic-launch-actions { align-items:stretch; flex-direction:column; }
  .semantic-launch-actions button { width:100%; }
  .semantic-result-head { flex-direction:column; }
  .semantic-result-actions { justify-content:flex-start; }
}

/* Hamburger, switch and avatar do not fit next to the wordmark on small phones. */
@media (max-width:420px) {
  .wordmark { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.01ms!important; animation-duration:.01ms!important; animation-iteration-count:1!important; }
}
/* Sync status lives in the page header as a quiet footer line. */
.dashboard-sync-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-top:20px; padding-top:14px; border-top:1px solid var(--line); color:var(--ink); }
.dashboard-sync-bar:empty { display:none; }
.dashboard-sync-bar > div { flex:1; min-width:240px; }
.dashboard-sync-bar strong { font-size:13px; font-weight:600; }
.dashboard-sync-bar span { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.dashboard-sync-bar button { min-height:36px; padding:6px 14px; font-size:13px; }
.dashboard-sync-bar .dashboard-sync-state { display:inline-flex; align-items:center; gap:8px; margin:0; color:var(--muted); font-size:12px; }
.dashboard-sync-state::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--line-strong); }
.dashboard-sync-state[data-ok="true"]::before { background:var(--ok); }
.dashboard-sync-bar details { flex-basis:auto; color:var(--muted); font-size:12px; }
.dashboard-sync-bar details[open] { flex-basis:100%; }
.dashboard-sync-bar details summary { cursor:pointer; }
.dashboard-sync-bar.has-issues { padding:12px 14px; border-top:0; border-radius:12px; background:var(--err-bg); }
.dashboard-sync-bar.has-issues strong { color:var(--err); }
.dashboard-task-result { margin-top:8px; overflow-wrap:anywhere; }
.dashboard-task-result p { margin:0; white-space:pre-wrap; font-size:13px; color:var(--ink); }
.dashboard-task-result a { display:block; font-size:13px; text-decoration:underline; }
.dashboard-task-result small { display:block; margin-top:5px; color:var(--muted); }
