@font-face {
  font-family: Roboto; src: url('/fonts/roboto-cyrillic.woff2') format('woff2');
  font-style: normal; font-weight: 100 900; font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Roboto; src: url('/fonts/roboto-latin.woff2') format('woff2');
  font-style: normal; font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
:root {
  color-scheme: light; font-family: Roboto, "Segoe UI", sans-serif; font-synthesis: none;
  color: #1d293e; background: #e8eff8;
  --ink: #1d293e; --hover: #344565; --active: #486497;
  --muted: #4e5e75; --edge: #cbd9ea; --light: #f0f2f5; --disabled: #f2f2f3;
  --glass: linear-gradient(145deg, #f8fbffeb, #eef5fca9);
  --blue-wash: linear-gradient(145deg, #dce8f8, #edf5fd);
  --page-background: radial-gradient(ellipse at 74% -8%, #f8fbff 0, transparent 53%), linear-gradient(106deg, #dfebf8, #edf4fc 54%, #deebf8);
  --shadow: 0 7px 28px #4864970d, inset 0 1px 0 #fff;
  --small: 12px; --medium: 20px; --large: 32px;
  --gutter: 24px; --margin: clamp(24px, 3.2vw, 48px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh;
  background: var(--page-background); }
body:has(.client-report-head) { background-attachment: fixed; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.3vw, 3.25rem); letter-spacing: -.04em; line-height: 1.06; }
h2 { font-size: 1.28rem; letter-spacing: -.025em; }
h3 { font-size: .99rem; }
button, input, select { font: inherit; }
button, .button {
  display: inline-flex; gap: .55rem; align-items: center; justify-content: center;
  min-height: 2.65rem; border: 1px solid transparent; border-radius: var(--large);
  padding: .55rem 1rem; font-size: .9rem; font-weight: 630;
  cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2;
  transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s;
}
button:disabled { background: var(--disabled); color: #727d8e; border-color: #e5e9f0; box-shadow: none; cursor: default; }
:where(button, input, select, a, summary):focus-visible { outline: 3px solid #6f91c4; outline-offset: 3px; }
.primary { background: var(--ink); color: #f5f7fb; }
.primary:hover:enabled { background: var(--hover); }
.primary:active:enabled { background: var(--active); }
.secondary { color: var(--ink); background: #f8fbffe6; border-color: var(--edge); box-shadow: 0 2px 6px #3445650b; }
.secondary:hover:not(:disabled) { background: #e0ebf9; border-color: #adc2de; }
.quiet { background: #e7eff9; color: var(--ink); min-height: 2.15rem; font-size: .86rem; }
.quiet:hover:enabled { background: #d6e5f7; }
.danger { color: #a02222; background: #ffebeb; }
.danger:hover:enabled { background: #fbd6d6; }
.icon { display: inline-grid; place-items: center; font-weight: 720; font-size: 1.08em; }
input, select {
  width: 100%; min-width: 0; border: 1px solid #c0cfe2; border-radius: var(--small);
  background: #f8fbff; color: var(--ink); height: 2.65rem; padding: 0 .76rem;
}
input[readonly] { background: #edf2f8; color: var(--muted); }
select { appearance: none; padding-right: 1.9rem;
  background-image: linear-gradient(45deg, transparent 50%, #486497 50%), linear-gradient(135deg, #486497 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
label { display: grid; gap: .4rem; font-weight: 610; font-size: .91rem; }
.loading { padding: 2rem; }
.shell { --shell-top: 24px; display: grid; grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100dvh; gap: 0; max-width: 1920px; margin: auto; }
.sidebar {
  display: flex; flex-direction: column;
  min-height: calc(100dvh - 2 * var(--shell-top)); max-height: calc(100dvh - 2 * var(--shell-top));
  position: sticky; top: var(--shell-top); margin: var(--shell-top) 0 var(--shell-top) 24px;
  padding: 16px 12px 12px; overflow: auto;
  background: var(--glass); border: 1px solid #ffffffcf; border-radius: var(--medium); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: .62rem; font-size: 1.15rem; font-weight: 760; letter-spacing: -.035em; }
.sidebar .brand { margin: 0 4px 28px; }
.brand-mark { display: grid; flex: 0 0 auto; place-items: center; width: 2.1rem; height: 2.1rem; color: #f0f2f5; border-radius: var(--small); background: var(--ink); }
.brand-mark .icon { font-size: 1.32rem; }
.project-control { display: grid; gap: .46rem; margin-bottom: 20px; }
.project-selection { display: flex; align-items: center; gap: 6px; min-width: 0; }
.project-selection select { flex: 1; min-width: 0; }
.project-control label, .nav-title { color: var(--muted); font-size: .875rem; margin-left: .48rem; }
.project-control select { background-color: #f7fbff; font-size: .88rem; }
.side-button, .report-link {
  width: 100%; color: var(--ink); border-color: transparent; background: transparent; justify-content: flex-start;
  text-align: left; white-space: normal; overflow-wrap: anywhere; min-height: 2.55rem; padding: .45rem .65rem;
  font-size: .85rem;
}
.side-button:hover, .report-link:hover { background: #e0ebf9; }
.project-tools { margin-top: 20px; border-top: 1px solid #ccdcef; padding-top: 12px; }
.nav-title { display: flex; align-items: center; justify-content: space-between; min-height: 2rem; margin-bottom: .35rem; font-weight: 650; }
.side-add, .exit { min-height: 1.85rem; padding: .15rem .55rem; border: 1px solid #d5e0ee; background: #f2f7fd; color: var(--hover); }
.side-add:hover, .exit:hover { background: #dbe8f9; }
.report-link.active { background: #f7fbff; color: var(--ink); border-color: #c9daef; box-shadow: 0 2px 9px #48649712; }
.report-nav-item { display: flex; align-items: center; gap: 4px; min-width: 0; }
.report-nav-item .report-link { min-width: 0; }
.report-nav-actions, .report-title-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.report-nav-actions { flex-direction: column; }
.report-link .icon, .side-button .icon { color: var(--active); }
.profile { display: grid; grid-template-columns: 1.75rem minmax(0,1fr) 1.75rem; align-items: center;
  gap: .45rem; margin-top: auto; padding-top: 1.35rem; }
.avatar { width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%;
  background: #d9e7f8; color: var(--ink); font-weight: 750; }
.profile strong { display: block; font-size: .77rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile small { color: var(--muted); font-size: .75rem; }
.topbar {
  display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 24px var(--margin) 0;
  padding: .58rem 1rem; border: 1px solid #fff; background: #f6fafead; border-radius: var(--large); color: var(--muted);
  box-shadow: 0 2px 15px #48649709; font-size: .875rem;
}
.topbar strong { color: var(--ink); }
.crumb { color: #677b96; }
.content { max-width: 1680px; margin: auto; padding: clamp(32px, 4vw, 64px) var(--margin) 64px; }
.report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px 24px; margin-bottom: 44px; }
.report-head.client-report-head {
  position: sticky; top: var(--shell-top); z-index: 5; gap: 12px 20px; padding: 16px 20px;
  border: 1px solid transparent; border-radius: var(--medium); box-shadow: var(--shadow);
}
.client-report-head::before, .client-report-head::after {
  content: ''; position: absolute; z-index: -1;
}
.client-report-head::before {
  inset: calc(-1px - var(--shell-top)) -1px -1px;
  background: var(--page-background); background-attachment: fixed;
}
.client-report-head::after {
  inset: -1px; border: 1px solid #fff; border-radius: inherit;
  background: linear-gradient(145deg, #f8fbff, #edf5fd);
  pointer-events: none;
}
.client-report-head .report-meta { margin-top: 10px; }
.client-report-head .actions:empty { display: none; }
.report-head h1, .empty h1 { overflow-wrap: anywhere; }
.report-title { display: flex; align-items: center; gap: 8px; }
.report-title h1 { min-width: 0; }
.rename-report { flex: 0 0 auto; display: inline-grid; place-items: center; min-height: 28px; width: 28px;
  padding: 0; color: var(--active); border-color: #c9daef; border-radius: var(--small); background: #f7fbff; }
.rename-report:hover { color: var(--ink); background: #e0ebf9; }
.delete-control { color: #a02222; }
.delete-control:hover:enabled { color: #a02222; background: #fde8e8; }
.rename-report svg, .delete-control svg, .copy-project svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.copy-project svg { color: var(--active); }
.report-logo { display: block; width: clamp(110px, 16vw, 185px); height: auto; filter: brightness(0); }
.report-head .actions { grid-column: 1 / -1; }
.report-meta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; color: var(--muted); font-size: .9rem; margin-top: 16px; }
.period { display: inline-flex; align-items: center; gap: .5rem; padding: .42rem .72rem;
  color: var(--ink); background: #f7fbffc9; border: 1px solid #cedced; border-radius: var(--small); font-weight: 650; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: var(--gutter); }
.dashboard-grid > * { grid-column: span 12; min-width: 0; }
.dashboard-grid > .half { grid-column: span 6; }
.section-title, .panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .55rem; }
.section-title { margin-bottom: 16px; }
.section-title h2, .panel-head h2, .empty h2 { overflow-wrap: anywhere; }
.section-title span, .panel-head span { font-size: .875rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(126px,100%),1fr)); gap: 16px; }
.card, .panel, .empty {
  border: 1px solid #ffffffd9; background: var(--glass); border-radius: var(--medium); box-shadow: var(--shadow);
}
.card { min-height: 134px; padding: 16px; background: linear-gradient(148deg,#f9fcffdb,#e4effbdc); }
.kpi-sign { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: var(--small);
  color: var(--active); background: #d9e7f8; font-weight: 750; }
.kpi-sign svg { width: 1.12rem; height: 1.12rem; }
.kpi-letters { font-size: .68rem; font-weight: 800; letter-spacing: .025em; }
.card p { font-size: .9rem; color: var(--muted); margin: .65rem 0 .3rem; }
.card strong { display: block; font-size: clamp(1.09rem, 1.85vw, 1.58rem);
  font-variant-numeric: tabular-nums; letter-spacing: -.043em; overflow-wrap: anywhere; }
.delta { display: inline-block; font-size: .82rem; color: #344565; margin-top: .35rem; }
.panel-head { padding: 20px 24px; }
.panel-head h2:empty, .section-title h2:empty { display: none; }
.panel-head:not(:has(h2:not(:empty), span)), .section-title:not(:has(h2:not(:empty), span)) { display: none; }
.panel-head:not(:has(h2:not(:empty))) { padding-block: 12px 6px; justify-content: flex-end; }
.panel > .funnel-steps:first-child, .panel-head:not(:has(h2:not(:empty), span)) + .funnel-steps { padding-top: 20px; }
.text-panel { overflow: hidden; }
.text-panel .panel-head { padding-bottom: 0; }
.text-panel:has(h2:not(:empty)) .text-body { padding-top: 10px; }
.text-body {
  box-sizing: border-box; display: block; width: 100%; margin: 0;
  padding: 18px min(var(--text-padding, 24px), 24%);
  font: inherit; font-size: var(--text-size, 16px); line-height: var(--text-spacing, 1.5);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; color: var(--ink);
}
.text-body.text-bold { font-weight: 700; }
.text-body.text-italic { font-style: italic; font-synthesis: style; }
.text-body.text-underline { text-decoration: underline; text-underline-offset: .15em; }
textarea.text-body { min-height: 100px; padding-top: 40px; background: transparent; border: 0; resize: none; }
textarea.text-body:focus-visible { outline-offset: -3px; border-radius: var(--medium); }
textarea.text-body::placeholder { color: var(--muted); }
.chart { position: relative; margin: 0 20px 20px; }
.chart canvas { display: block; width: 100%; height: 230px; }
.chart-tip { position: absolute; top: 0; z-index: 1; transform: translateX(-50%); background: var(--ink); color: white;
  padding: .4rem .62rem; border-radius: var(--small); font-size: .8rem; pointer-events: none; white-space: nowrap; }
.rank-chart { padding: 0 24px 24px; }
.rank-row { display: grid; grid-template-columns: minmax(100px,1fr) 2.6fr minmax(74px,.8fr);
  align-items: center; gap: 10px; padding: .42rem 0; font-size: .89rem; }
.rank-row > span { overflow-wrap: anywhere; }
.rank-row strong { text-align: right; }
.rank-track { height: .64rem; background: #dfebf8; border-radius: var(--large); position: relative; }
.rank-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7392bd,#486497); position: absolute; }
.rank-track.diverging i { left: 50%; }
.rank-track.diverging i.negative { transform: translateX(-100%); background: #a36d53; }
.donut-layout { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 4px 24px 24px; }
.donut-tip { z-index: 4; transform: none; max-width: min(15rem, calc(100% - 8px)); white-space: normal; overflow-wrap: anywhere; }
.donut-tip strong, .donut-tip span { display: block; }
.donut-tip span { margin-top: .2rem; }
.donut { width: 164px; height: 164px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 164px; }
.donut > div { background: #f4f9ff; width: 66%; height: 66%; border-radius: 50%; display: grid;
  justify-items: center; align-content: center; gap: .2rem; text-align: center; padding: 6px; }
.donut strong { max-width: 100%; overflow-wrap: anywhere; font-size: .87rem; }
.donut small { color: var(--muted); }
.donut-legend { flex: 1 1 230px; list-style: none; max-width: 680px; padding: 0; margin: 0; }
.donut-legend li { display: grid; grid-template-columns: 10px minmax(90px,1fr) max-content minmax(55px,max-content);
  align-items: center; gap: .5rem; padding: .42rem 0; border-bottom: 1px solid #dbe6f3; font-size: .87rem; }
.donut-legend li:last-child { border-bottom: 0; }
.donut-legend li.donut-highlight, .donut-legend li:focus-visible { background: #e0ecfa; border-radius: 6px; }
.donut-legend i { width: 9px; height: 9px; border-radius: 50%; }
.donut-legend span { overflow-wrap: anywhere; }
.donut-legend small { color: var(--muted); text-align: right; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: max(360px,100%); border-collapse: collapse; font-size: .89rem; font-variant-numeric: tabular-nums; }
td, th { text-align: right; padding: .7rem .74rem; border-bottom: 1px solid #dce6f2; }
thead th { background: #e1ebf8; color: var(--hover); white-space: nowrap; }
.interactive-table thead th { padding-block: .2rem; }
.column-button {
  min-height: 2rem; padding: .38rem .15rem; border-radius: 6px; background: transparent;
  color: inherit; gap: .3rem; font-size: inherit; font-weight: 720; white-space: nowrap;
}
.column-button:hover, th[aria-sort] .column-button { color: #23395a; background: #f3f8ff; }
.column-button span { color: var(--active); }
th:first-child { text-align: left; padding-left: 24px; min-width: 135px; }
td:last-child, th:last-child { padding-right: 24px; }
tbody th { font-weight: 600; }
tbody tr:hover { background: #e9f2fc; }
.table-foot { padding: 12px 24px; }
.empty { padding: 44px 20px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.empty p, .empty-inline, .help { color: var(--muted); }
.empty-inline { padding: 0 24px 20px; }
.help { font-size: .88rem; line-height: 1.45; }
.login-layout { display: grid; min-height: 100dvh; grid-template-columns: 1.05fr .95fr; padding: 24px; gap: 24px; }
.login-side { display: flex; flex-direction: column; justify-content: space-between; color: var(--ink);
  border: 1px solid #f8fbff; border-radius: var(--large); box-shadow: var(--shadow);
  background: radial-gradient(circle at 70% 20%,#f4f8ff,transparent 58%),linear-gradient(145deg,#e1edf9,#c8dbf2);
  overflow: hidden; padding: clamp(2rem,6vw,6rem); gap: 24px; }
.login-side h1 { font-size: clamp(2rem,4.6vw,4.7rem); }
.login-copy p { margin-top: 16px; max-width: 360px; color: var(--muted); line-height: 1.55; }
.login-art { height: clamp(80px,22vh,215px); display: flex; align-items: flex-end; gap: 12px; }
.login-art i { background: linear-gradient(155deg,#6b88b2,#486497); border-radius: 12px 12px 0 0; width: 12%; height: 22%; }
.login-art i:nth-child(2) { height: 41%; opacity: .76; }
.login-art i:nth-child(3) { height: 33%; opacity: .87; }
.login-art i:nth-child(4) { height: 59%; }
.login-art i:nth-child(5) { height: 55%; opacity: .76; }
.login-art i:nth-child(6) { height: 78%; opacity: .88; }
.login-art i:nth-child(7) { height: 100%; }
.login-main { display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%,420px); display: grid; gap: 16px; background: var(--glass);
  padding: clamp(24px,4vw,40px); border: 1px solid #fff; border-radius: var(--medium); box-shadow: var(--shadow); }
.login-card h2 { font-size: 1.72rem; margin-bottom: .3rem; }
.demo { border-top: 1px solid var(--edge); padding-top: .72rem; }
.demo small { color: var(--muted); display: block; margin-bottom: .48rem; }
.demo > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.demo button { font-size: .82rem; padding-inline: .62rem; }
dialog { padding: 0; border: 1px solid #fff; border-radius: var(--medium); color: var(--ink); background: #f1f6fc;
  width: min(calc(100% - 32px),560px); max-height: 90dvh; box-shadow: 0 22px 65px #1d293e33; }
dialog::backdrop { background: #1d293e85; backdrop-filter: blur(3px); }
.modal-head, dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; }
.modal-head { border-bottom: 1px solid #d6e3f2; background: #f8fbff9c; }
.modal-head p { color: var(--muted); margin-top: 4px; font-size: .9rem; overflow-wrap: anywhere; }
.close { background: #e7eff9; color: var(--ink); min-height: 2rem; padding: .1rem .66rem; font-size: 1.27rem; }
.modal-body { display: grid; gap: 14px; padding: 20px 24px; line-height: 1.5; }
dialog footer { justify-content: flex-end; border-top: 1px solid #d6e3f2; background: #f6faff; }
dialog[aria-labelledby="google-title"] footer { flex-wrap: wrap; }
.form-error:empty { display: none; }
.form-error { color: #a12626; font-size: .88rem; }
.connection-status { font-weight: 700; }
.members { list-style: none; margin: 0; padding: 0; }
.members li { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .55rem .1rem;
  border-bottom: 1px solid #d6e3f2; font-size: .875rem; }
.members li span { color: var(--muted); }
.members li button { margin-left: auto; }
dialog.builder { width: min(1460px,calc(100% - 48px)); max-width: none; height: min(900px,calc(100dvh - 48px)); max-height: none; }
.builder > form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; }
.builder-body { display: grid; grid-template-columns: minmax(222px,1fr) minmax(0,2.4fr) minmax(232px,1fr); min-height: 0; }
.builder-scroll { overflow: auto; padding: 20px; }
.builder-list { background: #f2f7fde0; border-right: 1px solid #d6e3f2; }
.builder-inspector { background: #f7faffdf; border-left: 1px solid #d6e3f2; display: grid; align-content: start; gap: 14px; }
.builder-preview { background: radial-gradient(ellipse at 30% 0,#eaf2fc,transparent 44%),linear-gradient(120deg,#dceafa,#eef5fd);
  display: grid; align-content: start; gap: 20px; }
.preview-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.preview-block {
  position: relative; min-width: 0; grid-column: span 2;
  border: 1px solid transparent; border-radius: var(--medium); scroll-margin: 12px;
}
.preview-block.half { grid-column: span 1; }
.preview-block.selected { border-color: #afc5e1; }
.preview-block > .summary { padding: .7rem .45rem .45rem; }
.preview-block > .summary .section-title, .preview-block > .panel > .panel-head { padding-right: 4.65rem; }
.preview-block > .summary:not(:has(h2:not(:empty), .section-title span)) .cards { padding-right: 3.8rem; }
.preview-block > .panel:not(:has(h2:not(:empty), .panel-head span)) .funnel-steps { padding-right: 3.8rem; }
.preview-tools { position: absolute; top: .55rem; right: .55rem; display: flex; gap: .3rem; z-index: 1; }
.preview-tools button, .preview-card .preview-remove {
  border: 1px solid #cbd9ea; min-height: 26px; width: 26px; padding: 0; border-radius: 8px; background: #f8fbff;
  color: var(--hover); line-height: 1;
}
.preview-remove .icon { font-size: 1.16rem; font-weight: 500; }
.preview-remove:hover { color: #a02222; background: #fde8e8; border-color: #ebc7c7; }
.preview-grip, .preview-card { cursor: grab; }
.preview-grip, [data-card-grip] { touch-action: none; }
.preview-grip:hover { background: #dceafa; }
.preview-card { position: relative; user-select: none; }
.preview-card .preview-remove { position: absolute; top: .5rem; right: .5rem; width: 24px; min-height: 24px; cursor: pointer; }
.drag-source { opacity: .46; cursor: grabbing; }
.drop-target { outline: 2px dashed #486497; outline-offset: -2px; background-color: #d7e7fa; }
.funnel-steps { display: grid; gap: 8px; list-style: none; margin: 0; padding: 4px clamp(8px, 3%, 24px) 20px; }
.funnel-step { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(6px, 3%, 22px);
  align-items: center; min-height: 48px; border-radius: var(--small); }
.funnel-track { display: flex; justify-content: center; min-width: 0; }
.funnel-level { display: grid; place-items: center; flex: none; box-sizing: border-box; min-height: 48px;
  --level-min: min(42%, 88px);
  width: calc(var(--level-min) + (100% - var(--level-min)) * var(--level-width));
  padding: 6px 12px; text-align: center; color: #fff; font-variant-numeric: tabular-nums;
  line-height: 1.15; overflow-wrap: anywhere; border-radius: 12px; background-color: var(--active);
  clip-path: polygon(0 0, 100% 0, 93% 100%, 7% 100%); }
.funnel-label { min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: .9rem; }
.funnel-step.preview-card .funnel-label { padding-right: 28px; }
.funnel-step.preview-card .preview-remove { top: 50%; transform: translateY(-50%); right: 2px; }
.funnel-icon { display: inline-block; flex: 0 0 auto; width: 1em; height: .86em; color: var(--active);
  background: repeating-linear-gradient(to bottom, currentColor 0 25%, transparent 25% 37.5%);
  clip-path: polygon(0 0, 100% 0, 61% 100%, 39% 100%); }
.preview-head, .builder-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.preview-head > span, .builder-list-head > span { color: var(--muted); font-size: .84rem; }
.builder-list-head { margin: 24px 0 10px; }
.block-palette { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.palette-card { display: grid; justify-items: start; padding: 10px; gap: 5px; min-width: 0; text-align: left; white-space: normal;
  background: var(--glass); border: 1px solid #fff; border-radius: var(--small); box-shadow: 0 2px 8px #48649713; color: var(--ink); }
.palette-card strong { color: var(--active); font-size: 1.36rem; line-height: 1; }
.line-icon { position: relative; display: inline-block; flex: 0 0 auto; width: 1em; height: .85em;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; color: var(--active); }
.line-icon::after { content: ''; position: absolute; inset: .08em 0 .11em .1em; background: currentColor;
  clip-path: polygon(0 79%, 31% 35%, 53% 55%, 88% 0, 100% 11%, 55% 78%, 32% 57%, 10% 94%); }
.palette-card span { font-size: .81rem; }
.palette-card:hover:enabled { background: #dceafa; border-color: #bacfe9; }
.block-list { display: grid; gap: 6px; padding: 1px 2px 6px; }
.block-row {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr) 26px 26px; align-items: center; gap: 2px;
  padding: 2px 3px 2px 0; border: 1px solid #d5e1ef; border-radius: var(--small); background: #f7fbff8f;
}
.block-row.selected { border-color: #a7bddc; background: #fbfdff; box-shadow: 0 2px 7px #48649716; }
.block-row:focus-within, .block-row:hover { z-index: 1; }
.block-item { justify-content: flex-start; min-height: 2.5rem; white-space: normal; text-align: left; overflow-wrap: anywhere;
  border-radius: var(--small); color: var(--ink); background: transparent; padding: .4rem .34rem; gap: .32rem; font-size: .85rem; }
.block-item:hover { background: #f1f7fe; }
.block-item[data-drag-list] { cursor: grab; user-select: none; }
.list-grip { display: grid; place-items: center; flex: 0 0 auto; touch-action: none; }
.chart-limit > span { display: flex; justify-content: space-between; gap: 8px; }
.chart-limit output { color: var(--active); font-variant-numeric: tabular-nums; }
.chart-limit input { height: 24px; padding: 0; cursor: ew-resize; accent-color: var(--active); }
.block-item .icon { color: var(--active); }
.block-action {
  position: relative; min-height: 28px; min-width: 24px; padding: 0;
  border-radius: 8px; background: transparent; color: var(--active);
}
.block-action:hover:enabled { background: #e5eef9; }
.block-action.remove:hover:enabled { background: #fde8e8; color: #a02222; }
.block-action.remove .icon { font-size: 1.24rem; line-height: 1; font-weight: 500; }
.copy-glyph { position: relative; width: 14px; height: 14px; }
.copy-glyph::before, .copy-glyph::after { content: ''; position: absolute; width: 9px; height: 9px;
  border: 1.3px solid currentColor; border-radius: 2px; }
.copy-glyph::before { top: 1px; left: 1px; }
.copy-glyph::after { top: 4px; left: 4px; background: #f7fbff; }
.block-action::after {
  content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 3px);
  padding: 5px 8px; color: white; background: var(--ink); border-radius: 7px;
  font-size: .75rem; font-weight: 500; white-space: nowrap; pointer-events: none; opacity: 0;
  visibility: hidden; transition: opacity .12s, visibility .12s;
}
.block-action:is(:hover, :focus-visible):enabled::after { opacity: 1; visibility: visible; }
.metric-options { margin: 0; padding: 10px 12px; border: 1px solid #c6d6e9; border-radius: var(--small); display: grid; gap: 6px; }
.metric-options legend { font-weight: 620; font-size: .9rem; padding: 0 4px; }
.text-controls { min-width: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid #c6d6e9; border-radius: var(--small); display: grid; gap: .75rem; }
.text-controls legend { font-weight: 620; font-size: .9rem; padding: 0 4px; }
.text-toggles { display: flex; gap: .4rem; }
.text-toggle { width: 2.45rem; padding-inline: 0; font-size: 1rem; }
.text-toggle.bold { font-weight: 800; }
.text-toggle.italic { font-style: italic; font-synthesis: style; }
.text-toggle.underline { text-decoration: underline; text-underline-offset: .14em; }
.text-toggle[aria-pressed="true"] { border-color: #9db5d7; background: #d3e2f5; }
.block-filters { min-width: 0; margin: 0; padding: 10px; border: 1px solid #c6d6e9;
  border-radius: var(--small); display: grid; gap: .65rem; }
.block-filters legend { font-weight: 620; font-size: .9rem; padding: 0 4px; }
.filter-rule { display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: .4rem; align-items: end;
  border-bottom: 1px solid #d6e3f2; padding-bottom: .65rem; }
.filter-rule label:first-child { grid-column: 1 / -1; }
.filter-rule .block-action { align-self: end; margin-bottom: .3rem; }
.block-filters > button { justify-self: start; max-width: 100%; }
.comparison-control, .comparison-fields { display: grid; gap: .55rem; min-width: 0; }
.comparison-fields { padding: .65rem; border: 1px solid #c6d6e9; border-radius: var(--small); }
.metric-options label { display: flex; align-items: center; gap: 8px; font-weight: 450; }
.metric-options input { width: 16px; height: 16px; margin: 0; accent-color: var(--active); }
.builder-reorder { display: flex; flex-wrap: wrap; gap: 6px; }
.builder-reorder button { padding: .36rem .7rem; }
.report-settings { border-radius: var(--small); border: 1px solid #d1dff0; background: #f7fbffd5; padding: 12px; }
.report-settings summary { cursor: pointer; font-weight: 620; font-size: .89rem; }
.report-settings label { margin-top: 12px; }
.report-source-row { display: flex; align-items: end; gap: 8px; }
.report-source-row label { flex: 1; min-width: 0; }
.report-source-row button { margin-bottom: 6px; }
.add-report-source { margin-top: 12px; }
.builder footer .form-error { margin-right: auto; }
#notice { display: none; position: fixed; z-index: 10; bottom: 20px; right: 20px; max-width: min(460px,calc(100% - 40px));
  padding: .85rem 1rem; border-radius: var(--small); color: white; background: var(--hover); box-shadow: 0 7px 25px #14233a37; }
#notice.show { display: block; }
#notice.error { background: #a72626; }
@media (max-width: 1070px) {
  .dashboard-grid > .half { grid-column: span 12; }
  .builder-scroll { padding: 12px; }
}
@media (max-width: 810px) {
  .shell { grid-template-columns: 178px minmax(0,1fr); }
  .sidebar { margin-left: 12px; padding-inline: 8px; }
  .builder-body { grid-template-columns: 1fr 1fr; overflow: auto; }
  .builder-scroll { overflow: visible; }
  .builder-preview { grid-column: 1/-1; grid-row: 2; }
  .preview-block.half { grid-column: span 2; }
  .builder-inspector { border-left: 0; }
}
@media (max-width: 610px) {
  .shell, .login-layout { display: block; }
  .shell { --shell-top: 12px; }
  .sidebar { position: static; min-height: auto; max-height: none; margin: var(--shell-top) 12px; padding: 12px; }
  .sidebar .brand, .project-control { margin-bottom: 8px; }
  .sidebar nav, .project-tools { display: flex; flex-wrap: wrap; gap: 4px; }
  .report-link, .project-tools .side-button { width: auto; }
  .project-tools { margin-top: 8px; }
  .profile { padding-top: 8px; }
  .topbar { margin-top: 4px; }
  .content { padding: 28px 16px 48px; }
  .report-head { margin-bottom: 28px; gap: 16px; }
  .report-head.client-report-head { gap: 8px 12px; padding: 12px; }
  .client-report-head h1 { font-size: clamp(1.25rem, 5vw, 2rem); }
  .report-logo { width: clamp(88px, 22vw, 120px); }
  .panel-head { padding: 16px; }
  .rank-chart { padding: 0 16px 16px; }
  .rank-row { grid-template-columns: minmax(80px,1fr) 1fr minmax(65px,.65fr); }
  .chart { margin-inline: 8px; }
  .login-layout { padding: 12px; }
  .login-side { padding: 24px; }
  .login-art { display: none; }
  dialog.builder { width: calc(100% - 16px); height: calc(100dvh - 16px); }
  .builder-body { grid-template-columns: minmax(112px,.85fr) minmax(0,1.15fr); }
  .builder-list .block-palette { grid-template-columns: 1fr; }
  .block-row { grid-template-columns: minmax(0,1fr) 23px 23px; }
  .block-action { min-width: 22px; }
  .builder footer, .builder .modal-head { padding-inline: 12px; }
}
