@font-face{font-family:'Manrope';font-weight:400;font-display:swap;src:url('/cabinet/static/fonts/manrope-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'Manrope';font-weight:400;font-display:swap;src:url('/cabinet/static/fonts/manrope-cyrillic-400-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Manrope';font-weight:500;font-display:swap;src:url('/cabinet/static/fonts/manrope-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'Manrope';font-weight:500;font-display:swap;src:url('/cabinet/static/fonts/manrope-cyrillic-500-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Manrope';font-weight:600;font-display:swap;src:url('/cabinet/static/fonts/manrope-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'Manrope';font-weight:600;font-display:swap;src:url('/cabinet/static/fonts/manrope-cyrillic-600-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Manrope';font-weight:700;font-display:swap;src:url('/cabinet/static/fonts/manrope-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'Manrope';font-weight:700;font-display:swap;src:url('/cabinet/static/fonts/manrope-cyrillic-700-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Manrope';font-weight:800;font-display:swap;src:url('/cabinet/static/fonts/manrope-latin-800-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'Manrope';font-weight:800;font-display:swap;src:url('/cabinet/static/fonts/manrope-cyrillic-800-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'IBM Plex Mono';font-weight:400;font-display:swap;src:url('/cabinet/static/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'IBM Plex Mono';font-weight:400;font-display:swap;src:url('/cabinet/static/fonts/ibm-plex-mono-cyrillic-400-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'IBM Plex Mono';font-weight:500;font-display:swap;src:url('/cabinet/static/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+20AC,U+2190-21FF}
@font-face{font-family:'IBM Plex Mono';font-weight:500;font-display:swap;src:url('/cabinet/static/fonts/ibm-plex-mono-cyrillic-500-normal.woff2') format('woff2');unicode-range:U+0400-052F,U+1C80-1C8A,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}

:root {
  color-scheme: light;
  --bg:#F5F6F7; --surface:#FFFFFF; --fg:#0A0B0D;
  --muted:#5E646C; --muted-2:#8A9098; --line:#DCDFE3; --steel:#C7CBD1;
  --accent:#1F3DFF; --accent-d:#1631D6; --accent-ink:#FFFFFF;
  --tint:rgba(31,61,255,.07); --soft:#F0F2F5;
  --good:#226B51; --goodbg:#EDF6F1; --warn:#8B5C1A; --warnbg:#FBF2E5;
  --bad:#AC4144; --badbg:#FCEFF0;
  --shadow:-16px 0 64px rgba(10,11,13,.12);
  --sans:Manrope,system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
  --sidebar:240px; --gutter:clamp(24px,3vw,48px); --header:80px;
}
html[data-theme=dark] {
  color-scheme:dark;
  --bg:#0D0E0F; --surface:#151719; --fg:#EDE8DF;
  --muted:#9A958C; --muted-2:#6F6B65; --line:rgba(237,232,223,.13); --steel:rgba(237,232,223,.24);
  --accent:#C8A978; --accent-d:#D9BE92; --accent-ink:#0D0E0F;
  --tint:rgba(200,169,120,.08); --soft:#1A1C1E;
  --good:#9BC5AE; --goodbg:#1A2B23; --warn:#DFC18D; --warnbg:#2D261C;
  --bad:#EBA5A8; --badbg:#2E2023; --shadow:-16px 0 64px rgba(0,0,0,.32);
}
* { box-sizing:border-box; }
html { scroll-behavior:auto; scroll-padding-top:calc(var(--header) + 24px); }
body { margin:0; background:var(--bg); color:var(--fg); font:400 14px/1.6 var(--sans); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
button,input,textarea,select { font:inherit; color:inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; border:0; background:none; }
button:disabled { cursor:default; opacity:.45; }
:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
svg { display:block; }
p,h1,h2,h3 { margin:0; }
button svg,.btn svg,.icon { width:18px; height:18px; flex-shrink:0; }
::selection { background:var(--accent); color:var(--accent-ink); }
.mono { font:400 11px/1.5 var(--mono); letter-spacing:.065em; text-transform:uppercase; }
small { font-size:12px; }
.muted { color:var(--muted); }
.skip { position:fixed; left:16px; top:-80px; z-index:100; background:var(--fg); color:var(--bg); padding:12px 16px; }
.skip:focus { top:12px; }

/* Permanent frame: the same restrained rules and type hierarchy as amreq.ru. */
.sidebar { position:fixed; inset:0 auto 0 0; width:var(--sidebar); padding:32px 24px 24px; border-right:1px solid var(--line); background:var(--bg); display:flex; flex-direction:column; z-index:25; }
.brand { display:block; width:144px; }
.brand svg { width:100%; height:auto; }
.sidebar-caption { margin:26px 0 24px; padding-bottom:24px; border-bottom:1px solid var(--line); color:var(--muted); font-size:10px; letter-spacing:.1em; }
.nav-link { min-height:48px; display:flex; align-items:center; gap:12px; margin:4px -12px; padding:12px; border-left:2px solid transparent; color:var(--muted); font-size:13px; font-weight:500; }
.nav-link svg { width:18px; height:18px; flex-shrink:0; }
.nav-link:hover { color:var(--fg); background:var(--soft); }
.nav-link.active { color:var(--accent); border-left-color:var(--accent); background:var(--tint); font-weight:700; }
.nav-link .count { margin-left:auto; font:11px var(--mono); }
.sidebar-bottom { margin-top:auto; padding-top:24px; border-top:1px solid var(--line); font-size:12px; }
.sidebar-bottom p { margin-top:8px; color:var(--muted); font-size:12px; line-height:1.7; }
.local-dot { display:none; }
.version { margin-top:24px; font-size:9px; color:var(--muted-2); }
.workspace { margin-left:var(--sidebar); }
.topbar { position:sticky; top:0; z-index:20; height:var(--header); padding:0 var(--gutter); display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); background:var(--bg); }
.breadcrumb { display:flex; gap:14px; align-items:center; font-size:12px; }
.breadcrumb span,.breadcrumb i { color:var(--muted); font-style:normal; }
.breadcrumb strong { font-weight:600; }
.top-actions { display:flex; align-items:center; gap:20px; }
.user-email { color:var(--muted); font-size:10px; text-transform:none; letter-spacing:0; }
.logout-form { margin:0; }
.logout-form button { font-size:12px; }
.mobile-nav,.mobile-brand { display:none; }
.amr-themes { display:flex; align-items:center; gap:2px; border:1px solid var(--line); border-radius:24px; padding:3px; background:var(--surface); }
.amr-themes button { display:grid; place-items:center; width:32px; height:30px; padding:0; border-radius:50%; color:var(--muted-2); }
.amr-themes button svg { width:17px; height:17px; }
.amr-themes button:hover { color:var(--fg); }
.amr-themes button[aria-pressed=true] { background:var(--line); color:var(--fg); }
main { max-width:1680px; min-height:calc(100dvh - 150px); padding:36px var(--gutter) 56px; margin:auto; }
.eyebrow { margin-bottom:14px; color:var(--accent); font-size:11px; letter-spacing:.08em; }
.eyebrow:before { content:none; }
h1 { font-size:clamp(36px,3.3vw,52px); font-weight:800; letter-spacing:-.048em; line-height:1.08; }
.page-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:28px; margin-bottom:32px; }
.page-heading>div:first-child { min-width:0; }
.page-heading p { max-width:760px; margin-top:16px; color:var(--muted); font-size:14px; line-height:1.65; }
.snapshot { flex-shrink:0; padding-bottom:2px; text-align:right; color:var(--muted); font:10px/1.8 var(--mono); letter-spacing:.03em; }
.snapshot b { color:var(--fg); font-weight:500; }
.notice { display:flex; align-items:center; gap:14px; padding:16px 0; margin-bottom:30px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.notice .text-link { margin-left:auto; white-space:nowrap; }
.text-link { display:inline-block; padding:2px 0; color:var(--fg); border-bottom:1px solid var(--steel); font-size:12px; font-weight:600; }
.text-link:hover { color:var(--accent); border-color:var(--accent); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:44px; padding:10px 18px; border:1px solid var(--fg); background:transparent; font-size:13px; line-height:1.4; font-weight:600; text-align:center; white-space:nowrap; }
.btn:hover { color:var(--bg); background:var(--fg); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn.primary:hover { background:var(--accent-d); border-color:var(--accent-d); }
.btn.small { min-height:40px; padding:9px 14px; font-size:12px; }
.btn.ghost { border-color:var(--line); }
.icon-button { display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:10px; border:1px solid var(--line); }
.icon-button:hover { border-color:var(--fg); }
.tag { display:inline-flex; align-items:center; width:fit-content; min-height:24px; padding:4px 8px; border:1px solid var(--line); color:var(--muted); font:400 10px/1.45 var(--mono); letter-spacing:.015em; text-align:left; white-space:normal; }
.tag.accent { color:var(--accent); background:var(--tint); border-color:color-mix(in srgb,var(--accent) 26%,transparent); }
.tag.good { color:var(--good); background:var(--goodbg); border-color:transparent; }
.tag.warn { color:var(--warn); background:var(--warnbg); border-color:transparent; }
.tag.bad { color:var(--bad); background:var(--badbg); border-color:transparent; }
.tag.neutral { background:var(--soft); }

/* Data uses the website's technical specification rhythm, not nested tiles. */
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid var(--fg); border-bottom:1px solid var(--line); margin-bottom:32px; }
.metric { position:relative; min-width:0; padding:24px 24px 26px; border-right:1px solid var(--line); }
.metric:first-child { padding-left:0; }
.metric:last-child { border-right:0; }
.metric .meta { min-height:34px; color:var(--muted); font-size:10px; letter-spacing:.04em; }
.metric .value { display:flex; align-items:baseline; gap:10px; margin:12px 0; font-size:clamp(42px,4vw,64px); line-height:1; font-weight:800; letter-spacing:-.055em; }
.metric .value span { color:var(--muted); font:11px var(--mono); letter-spacing:0; }
.metric .foot { color:var(--muted); font-size:12px; line-height:1.6; }
.metric button { position:absolute; inset:0; z-index:1; }
.metric:hover { background:var(--tint); }
.panel { min-width:0; border:1px solid var(--line); background:var(--surface); }
.panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:24px; border-bottom:1px solid var(--line); }
.panel-head h2 { font-size:21px; line-height:1.25; letter-spacing:-.035em; font-weight:700; }
.panel-head p { margin-top:8px; color:var(--muted); font-size:12px; line-height:1.6; }
.panel-body { padding:24px; }
.overview-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:24px; margin-bottom:32px; align-items:start; }
.section-line { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:36px 0 20px; }
.section-line h2 { font-size:25px; line-height:1.25; font-weight:700; letter-spacing:-.04em; }
.section-line h2 .muted { margin-left:6px; font-family:var(--mono); font-size:16px; font-weight:400; letter-spacing:0; }
.section-line p { margin-top:8px; color:var(--muted); font-size:12px; line-height:1.65; }
.section-line>.btn { flex-shrink:0; }
.funnel-row { display:grid; grid-template-columns:minmax(130px,1fr) 72px 30px 40px; align-items:center; gap:16px; padding:16px 0; border-bottom:1px solid var(--line); font-size:13px; }
.funnel-row:last-of-type { border-bottom:0; }
.funnel-row .bar,.reaction-row .bar { height:3px; background:var(--line); }
.funnel-row .bar i,.reaction-row .bar i { display:block; height:100%; background:var(--accent); }
.funnel-row .num,.funnel-row .pct { text-align:right; font:12px var(--mono); }
.funnel-row .pct { color:var(--muted); font-size:10px; }
.panel-note { padding-top:18px; color:var(--muted); font-size:12px; line-height:1.75; overflow-wrap:anywhere; }
.decisions { padding:0 24px; }
.decision { padding:24px 0; border-bottom:1px solid var(--line); }
.decision:last-child { border:0; }
.decision-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.decision h3 { font-size:17px; font-weight:700; letter-spacing:-.025em; line-height:1.4; }
.decision>p { margin:12px 0 18px; color:var(--muted); font-size:13px; line-height:1.7; }
.decision .context-box { margin:0 0 18px; }
.decision-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.decision-bottom span { color:var(--muted); font-size:12px; }
.reaction-row { display:grid; grid-template-columns:minmax(0,1fr) 70px 78px; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); font-size:13px; }
.reaction-row .num { font:15px var(--mono); text-align:right; white-space:nowrap; }
.reaction-row .num small { color:var(--muted); font-size:10px; }
.commercial-result { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; padding-top:18px; border-top:1px solid var(--fg); }
.commercial-result strong { font-size:22px; letter-spacing:-.04em; }
.commercial-result i { font-style:normal; color:var(--muted); font-size:12px; }

/* Opportunities and stage strip. Existing order and evidence are unchanged. */
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:22px 0; }
.search { display:flex; align-items:center; gap:12px; width:min(400px,50%); min-height:46px; padding:0 14px; border:1px solid var(--line); background:var(--surface); color:var(--muted); }
.search:focus-within { border-color:var(--accent); }
.search svg { width:18px; height:18px; flex-shrink:0; }
.search input { width:100%; min-width:0; padding:12px 0; border:0; outline:0; background:none; font-size:13px; }
.search input::placeholder { color:var(--muted); opacity:1; }
.filters,.filter-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.filter { min-height:38px; padding:8px 13px; border:1px solid var(--line); border-radius:24px; color:var(--muted); font-size:12px; line-height:1.4; }
.filter:hover { color:var(--fg); border-color:var(--steel); }
.filter.active { background:var(--fg); border-color:var(--fg); color:var(--bg); }
.filter span { margin-left:6px; font:10px var(--mono); opacity:.7; }
.direction-filter { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:12px; }
.direction-filter select,.project-picker select { max-width:100%; padding:12px 36px 12px 14px; border:1px solid var(--line); border-radius:0; background:var(--surface); color:var(--fg); font-size:13px; }
.pipeline-stages { display:flex; border-top:1px solid var(--fg); border-bottom:1px solid var(--line); }
.stage-card { position:relative; display:flex; flex:1; flex-direction:column; justify-content:space-between; gap:18px; min-width:0; min-height:132px; padding:18px 14px 20px; border-right:1px solid var(--line); text-align:left; }
.stage-card:first-child { padding-left:0; }
.stage-card:last-child { border-right:0; }
.stage-card span { color:var(--muted); font:400 10px/1.65 var(--mono); }
.stage-card strong { font-size:36px; font-weight:700; letter-spacing:-.055em; line-height:1; }
.stage-card:hover { background:var(--tint); }
.stage-card.active { color:var(--accent); box-shadow:inset 0 -3px var(--accent); }
.stage-card.active span { color:var(--accent); }
.result-count { color:var(--muted); font:10px/1.5 var(--mono); letter-spacing:.07em; }
.opportunity-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.opportunity-grid>.panel { display:flex; flex-direction:column; }
.opportunity-open { display:flex; flex:1; flex-direction:column; align-items:flex-start; width:100%; min-height:310px; padding:26px; text-align:left; }
.opportunity-open:hover { background:var(--tint); }
.opportunity-open h3 { margin:16px 0 12px; font-size:24px; line-height:1.2; letter-spacing:-.04em; font-weight:700; overflow-wrap:anywhere; }
.opportunity-parties { margin-bottom:18px; color:var(--muted); font:10px/1.8 var(--mono); }
.opportunity-open>p { margin:0 0 14px; font-size:13px; line-height:1.75; }
.opportunity-open .sub { display:block; margin-bottom:22px; color:var(--muted); font:10px var(--mono); }
.opportunity-next { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; margin-top:auto; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; line-height:1.6; }
.opportunity-next svg { flex-shrink:0; color:var(--fg); }
.opportunity-meta { display:flex; justify-content:space-between; gap:18px; padding:14px 26px; border-top:1px solid var(--line); color:var(--muted); font:10px/1.7 var(--mono); }
.opportunity-meta span:last-child { max-width:70%; text-align:right; }
.project-picker { margin:22px 0; }
.project-picker label { display:block; margin-bottom:10px; font-size:13px; font-weight:600; }
.project-picker select { width:100%; }
.project-choice { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:16px 0; border-bottom:1px solid var(--line); text-align:left; font-size:14px; }
.project-choice span { color:var(--muted); font-size:12px; }

/* Lists and tables retain the accepted prototype's grouping and navigation. */
.events-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.events-table th { padding:15px 18px; border-bottom:1px solid var(--fg); color:var(--muted); font:400 10px/1.5 var(--mono); letter-spacing:.04em; text-align:left; text-transform:uppercase; }
.events-table th:nth-child(1) { width:27%; }
.events-table th:nth-child(2) { width:auto; }
.events-table th:nth-child(3) { width:22%; }
.events-table th:last-child { width:60px; }
.events-table:has(th:nth-child(6)) th:nth-child(1) { width:21%; }
.events-table:has(th:nth-child(6)) th:nth-child(2) { width:auto; }
.events-table:has(th:nth-child(6)) th:nth-child(3) { width:18%; }
.events-table:has(th:nth-child(6)) th:nth-child(4) { width:21%; }
.events-table:has(th:nth-child(6)) th:nth-child(5) { width:7%; }
.events-table td { padding:20px 18px; border-bottom:1px solid var(--line); vertical-align:top; font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.events-table tr:last-child td { border-bottom:0; }
.events-table tbody tr:hover { background:var(--tint); }
.events-table .company-name { display:block; font-size:14px; font-weight:700; line-height:1.5; }
.events-table .sub { display:block; margin-top:7px; color:var(--muted); font-size:11px; line-height:1.6; }
.event-copy { font-size:13px; line-height:1.7; }
.row-open { width:100%; padding:0; text-align:left; }
.events-table td.cell-arrow { padding-left:8px; padding-right:8px; }
.events-table .arrow { display:grid; place-items:center; width:44px; height:44px; padding:0; font-size:20px; }
.company-cell { display:flex; gap:12px; align-items:flex-start; }
.company-monogram { display:grid; place-items:center; width:34px; height:36px; flex:0 0 34px; border:1px solid var(--line); color:var(--muted); font:10px var(--mono); }
.channel-dots { display:flex; flex-wrap:wrap; gap:4px; }
.channel-dots span { display:grid; place-items:center; min-width:22px; min-height:24px; padding:3px; border:1px solid var(--line); font:9px var(--mono); }
.empty { padding:40px 28px; color:var(--muted); font-size:14px; line-height:1.7; }
.empty strong { display:block; margin-bottom:12px; color:var(--fg); font-size:22px; letter-spacing:-.03em; }
.empty .btn { margin-top:20px; }
.campaign-summary { display:grid; grid-template-columns:1.2fr 1fr; gap:24px; align-items:start; }
.wave { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px; border-bottom:1px solid var(--line); }
.wave strong { font-size:16px; }
.wave span { font:10px var(--mono); color:var(--muted); }
.summary-number { font-size:42px; font-weight:800; letter-spacing:-.05em; }
.stat-line { display:flex; justify-content:space-between; gap:20px; padding:14px 0; border-bottom:1px solid var(--line); font-size:13px; }
.stat-line:last-child { border:0; }
.stat-line strong { font:14px var(--mono); }
.stat-line span { color:var(--muted); }
.source-details { margin-top:26px; padding:20px 24px; }
summary { cursor:pointer; }
.source-details summary { font-size:13px; font-weight:600; }
.source-details pre { white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted); font:11px/1.8 var(--mono); }
.source-details>p { margin-top:14px; font-size:12px; color:var(--muted); line-height:1.75; }
.mini-project { display:grid; grid-template-columns:.9fr 1.1fr; gap:28px; padding:28px; }
.mini-project h3 { font-size:24px; letter-spacing:-.04em; }
.mini-project p { margin-top:12px; color:var(--muted); font-size:13px; }
.project-routes { display:grid; gap:12px; }
.project-route { padding:18px; border:1px solid var(--line); }
.project-route strong { font-size:14px; }
.project-route p { margin:8px 0 14px; color:var(--muted); font-size:12px; }
.project-foot { grid-column:1/-1; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.agents-intro { padding:28px; border-top:1px solid var(--fg); }
.agents-number { margin-bottom:16px; color:var(--accent); font:11px var(--mono); }
.agents-intro h2 { font-size:28px; font-weight:700; letter-spacing:-.04em; }
.agents-intro p { max-width:700px; margin-top:14px; color:var(--muted); font-size:14px; }
.agent-work { display:grid; grid-template-columns:1.1fr 1fr; align-items:start; gap:24px; margin-top:24px; }
.proposal,.task-row { padding:22px 0; border-bottom:1px solid var(--line); }
.proposal,.panel>.task-row { padding:24px; }
.proposal:last-child,.task-row:last-child { border:0; }
.proposal strong,.task-row strong { color:var(--fg); font-size:15px; }
.proposal p,.task-row p { margin:10px 0 16px; color:var(--muted); font-size:13px; }
.history-signals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:26px; }
.signal { padding:24px; border:1px solid var(--line); }
.signal h3 { font-size:17px; }
.signal p { margin-top:10px; color:var(--muted); font-size:13px; }
.page-footer { display:flex; justify-content:space-between; gap:24px; padding:24px var(--gutter); border-top:1px solid var(--line); color:var(--muted); font:10px/1.7 var(--mono); }
.page-footer span:last-child { max-width:70%; text-align:right; }

/* Context drawer: one readable document with an explicit next action. */
.scrim { position:fixed; inset:0; z-index:40; background:rgba(10,11,13,.5); }
.drawer { position:fixed; top:0; right:0; z-index:41; display:flex; flex-direction:column; width:min(760px,calc(100vw - 40px)); height:100vh; height:100dvh; background:var(--bg); border-left:1px solid var(--line); box-shadow:var(--shadow); }
.drawer-head { display:flex; flex-shrink:0; align-items:flex-start; justify-content:space-between; gap:20px; padding:28px; border-bottom:1px solid var(--line); background:var(--bg); }
.drawer-head h2 { font-size:30px; line-height:1.15; letter-spacing:-.045em; font-weight:800; }
.drawer-head p { margin-top:10px; color:var(--muted); font-size:12px; }
.drawer-scroll { flex:1; min-height:0; padding:28px; overflow-y:auto; overscroll-behavior:contain; overflow-wrap:anywhere; }
.context-box { padding:22px; margin-bottom:24px; border:1px solid var(--line); background:var(--surface); }
.context-box h3 { margin-bottom:12px; font-size:22px; line-height:1.25; font-weight:700; letter-spacing:-.035em; }
.context-box p { font-size:14px; line-height:1.75; }
.context-next { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:12px; margin-top:18px; padding-top:16px; border-top:1px solid var(--line); font-size:12px; }
.context-next>span { color:var(--muted); }
.context-next strong { font-size:13px; }
.drawer-actions { display:flex; gap:10px; flex-wrap:wrap; margin:22px 0; }
.drawer-section { border-top:1px solid var(--line); padding:20px 0; }
.drawer-section summary { display:list-item; list-style:disclosure-closed inside; font-size:13px; font-weight:600; }
.drawer-section[open] summary { list-style-type:disclosure-open; }
.drawer-section summary span { float:right; color:var(--muted); font:11px var(--mono); }
.person { padding:18px 0; border-bottom:1px solid var(--line); }
.person:last-child { border-bottom:0; }
.person strong { font-size:15px; font-weight:700; }
.person p { margin-top:7px; color:var(--muted); font-size:12px; line-height:1.7; }
.person .address { color:var(--fg); font:12px/1.7 var(--mono); overflow-wrap:anywhere; }
.person.external { padding:18px; margin:12px 0; border:1px solid var(--line); }
.timeline-item { position:relative; padding:22px 0 22px 20px; border-left:1px solid var(--line); }
.timeline-item:before { content:''; position:absolute; top:28px; left:-3px; width:5px; height:5px; background:var(--accent); }
.timeline-item .meta { display:flex; flex-wrap:wrap; align-items:center; gap:10px; color:var(--muted); font:10px/1.5 var(--mono); }
.timeline-item p { margin-top:12px; font-size:14px; line-height:1.75; }
.timeline-item details { margin-top:12px; }
.timeline-item details summary { color:var(--muted); font-size:12px; }
.timeline-item details p { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.drawer .filter-row { margin:18px 0 8px; }
.local-form { margin:22px 0; padding:22px; border:1px solid var(--steel); background:var(--surface); }
.local-form label { display:block; margin:18px 0 8px; color:var(--muted); font:10px/1.6 var(--mono); text-transform:uppercase; letter-spacing:.06em; }
.local-form label:first-child { margin-top:0; }
.local-form textarea,.local-form input,.local-form select { display:block; width:100%; padding:12px 14px; border:1px solid var(--steel); border-radius:0; background:var(--bg); color:var(--fg); font-size:14px; }
.local-form textarea { min-height:144px; resize:vertical; line-height:1.7; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-foot { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:18px; }
.form-foot p { max-width:65%; color:var(--muted); font-size:12px; line-height:1.6; }
.saved-note { margin:18px 0; padding:20px; border:1px solid var(--line); background:var(--surface); }
.saved-note .meta { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; color:var(--muted); font:10px/1.5 var(--mono); }
.saved-note p { margin-top:12px; font-size:14px; white-space:pre-wrap; line-height:1.75; }
.storage-warning,.record-error { padding:14px 18px; border:1px solid var(--bad); color:var(--bad); font-size:13px; }
.project-party { display:flex; align-items:baseline; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); font-size:14px; }
.project-party span { max-width:65%; color:var(--muted); font-size:12px; text-align:right; }
.drawer .context-box details { margin-top:18px; }
.drawer .context-box summary { font-size:12px; color:var(--muted); }
.claim-variant { margin:18px 0; padding:18px; border:1px solid var(--line); }
.claim-details p { color:var(--muted); font-size:13px; line-height:1.75; }
#toast { position:fixed; bottom:28px; right:28px; z-index:90; max-width:calc(100vw - 40px); padding:16px 22px; border:1px solid var(--line); background:var(--fg); color:var(--bg); font-size:13px; opacity:0; transform:translateY(12px); pointer-events:none; }
#toast.show { opacity:1; transform:none; }

/* Authentication shares the same logo, controls, colors and font assets. */
.auth-page { min-height:100vh; }
.auth-header { display:flex; justify-content:space-between; align-items:center; height:88px; padding:0 clamp(24px,4vw,56px); border-bottom:1px solid var(--line); }
.auth-logo { display:block; width:144px; }
.auth-logo svg { width:100%; height:auto; }
.auth-main { width:min(100% - 40px,460px); margin:clamp(36px,8vh,88px) auto 32px; }
.auth-intro { margin-bottom:20px; color:var(--muted); font-size:11px; }
.auth-card { border:1px solid var(--line); background:var(--surface); padding:38px; }
.auth-step { margin-bottom:22px; color:var(--accent); font-size:10px; }
.auth-card h1 { font-size:36px; line-height:1.1; }
.auth-lead { margin:18px 0 26px; color:var(--muted); font-size:14px; }
.auth-card label { display:block; margin:22px 0 8px; font-size:13px; font-weight:500; }
.auth-card input { width:100%; min-height:50px; padding:12px 14px; border:1px solid var(--line); border-radius:0; background:var(--bg); font-size:16px; }
.auth-card input:focus { border-color:var(--accent); }
.auth-label-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.auth-label-row a { color:var(--muted); font-size:12px; }
.auth-submit { display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; min-height:52px; margin-top:24px; padding:14px 18px; border:1px solid var(--accent); background:var(--accent); color:var(--accent-ink); font-size:14px; font-weight:600; }
.auth-submit:hover { border-color:var(--accent-d); background:var(--accent-d); }
.auth-hint,.auth-back { color:var(--muted); font-size:12px; line-height:1.75; }
.auth-hint { margin-top:22px; }
.auth-back { display:inline-block; margin-top:24px; }
.auth-footer { padding:0 20px 28px; color:var(--muted); text-align:center; font-size:10px; }
.auth-secondary { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-top:22px; font-size:12px; }
.auth-secondary button { padding:0 0 2px; border-bottom:1px solid var(--steel); }
.auth-secondary a { color:var(--muted); }
.auth-code { font-family:var(--mono); letter-spacing:.3em; }
.errorlist { padding-left:18px; color:var(--bad); font-size:12px; line-height:1.7; }
.helptext { display:block; margin-top:12px; color:var(--muted); font-size:12px; }
.helptext ul { padding-left:18px; }
.loading { padding:32px 0; color:var(--muted); font-size:14px; }

@media(min-width:1680px) {
  :root { --sidebar:264px; }
  .sidebar { padding-left:32px; padding-right:32px; }
}
@media(max-width:1180px) {
  :root { --sidebar:212px; --gutter:28px; }
  .sidebar { padding-left:20px; padding-right:20px; }
  .user-email { display:none; }
  .overview-grid,.campaign-summary { grid-template-columns:1fr; }
  .history-signals { grid-template-columns:1fr 1fr; }
  .funnel-row { grid-template-columns:minmax(130px,1fr) 100px 30px 40px; }
  .opportunity-open { padding:22px; }
  .opportunity-meta { padding:14px 22px; }
  .events-table td,.events-table th { padding-left:14px; padding-right:14px; }
  .events-table td.cell-arrow { padding-left:8px; padding-right:8px; }
  .events-table .company-monogram { display:none; }
}
@media(max-width:900px) {
  :root { --header:72px; --gutter:24px; }
  html { scroll-padding-top:144px; }
  .sidebar { display:none; }
  .workspace { margin-left:0; }
  .mobile-brand { display:block; width:118px; flex-shrink:0; }
  .mobile-brand svg { width:100%; height:auto; }
  .breadcrumb,.user-email { display:none; }
  .mobile-nav { display:flex; gap:8px; position:sticky; top:var(--header); z-index:19; min-height:52px; padding:0 var(--gutter); border-bottom:1px solid var(--line); background:var(--bg); overflow-x:auto; scrollbar-width:none; }
  .mobile-nav::-webkit-scrollbar { display:none; }
  .mobile-nav .nav-link { min-height:52px; margin:0; padding:12px 8px; gap:8px; border-left:0; border-bottom:2px solid transparent; white-space:nowrap; font-size:12px; }
  .mobile-nav .nav-link.active { border-bottom-color:var(--accent); background:transparent; }
  .mobile-nav .nav-link svg,.mobile-nav .count { display:none; }
  .campaign-summary,.mini-project,.agent-work { grid-template-columns:1fr; }
  main { padding-top:28px; }
  .page-heading { gap:20px; }
  .page-heading h1 { font-size:40px; }
  .pipeline-stages { overflow-x:auto; }
  .stage-card { flex:1 0 148px; min-height:128px; }
  .stage-card:first-child { padding-left:16px; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric { padding:22px; border-bottom:1px solid var(--line); }
  .metric:first-child { padding-left:22px; }
  .metric:nth-child(2n) { border-right:0; }
  .metric:nth-last-child(-n+2) { border-bottom:0; }
  .desktop-only { display:none; }
  .page-footer { flex-direction:column; gap:8px; }
  .page-footer span:last-child { max-width:100%; text-align:left; }
}
@media(max-width:600px) {
  :root { --gutter:18px; }
  .top-actions { gap:14px; }
  .amr-themes button { width:29px; height:29px; }
  .topbar { gap:12px; }
  .logout-form button { font-size:11px; }
  .mobile-brand { width:108px; }
  .mobile-nav { gap:4px; }
  .mobile-nav .nav-link { padding-left:7px; padding-right:7px; font-size:11px; }
  main { padding-bottom:36px; }
  .page-heading { display:block; margin-bottom:24px; }
  .page-heading h1 { font-size:36px; }
  .page-heading p { margin-top:14px; font-size:13px; }
  .eyebrow { margin-bottom:12px; font-size:10px; }
  .snapshot { margin-top:18px; text-align:left; font-size:10px; }
  .snapshot br { display:none; }
  .snapshot b { margin-left:12px; }
  .notice { display:grid; grid-template-columns:1fr auto; align-items:start; gap:12px; padding:14px 0; font-size:12px; }
  .notice>.tag { grid-column:1; grid-row:1; }
  .notice .text-link { grid-column:2; grid-row:1; margin-left:0; }
  .notice>span:nth-child(2) { grid-column:1/-1; grid-row:2; min-width:0; }
  .metrics { margin-bottom:24px; }
  .metric,.metric:first-child { padding:20px 16px; }
  .metric .value { font-size:44px; }
  .metric .meta { min-height:32px; font-size:9px; }
  .metric .foot { font-size:11px; }
  .metric .value span { font-size:10px; }
  .section-line { align-items:flex-start; gap:14px; margin-top:28px; }
  .section-line h2 { font-size:23px; }
  .section-line p { font-size:12px; }
  .section-line>.btn { min-width:0; max-width:44%; padding:9px 11px; font-size:11px; }
  .section-line>.btn svg { display:none; }
  .overview-grid,.opportunity-grid,.history-signals { grid-template-columns:1fr; gap:18px; }
  .panel-head,.panel-body { padding:20px; }
  .panel-head h2 { font-size:20px; }
  .panel-head .tag { flex-shrink:0; }
  .decisions { padding:0 20px; }
  .decision-top { flex-wrap:wrap; }
  .decision { padding:22px 0; }
  .funnel-row { grid-template-columns:minmax(0,1fr) 28px 25px 36px; gap:9px; font-size:12px; }
  .reaction-row { grid-template-columns:minmax(0,1fr) 28px 62px; gap:10px; font-size:12px; }
  .reaction-row .num { font-size:13px; }
  .reaction-row .num small { font-size:9px; }
  .opportunity-open { min-height:0; padding:22px; }
  .opportunity-open h3 { font-size:25px; }
  .opportunity-parties { font-size:10px; }
  .opportunity-open>p { font-size:13px; }
  .opportunity-next { margin-top:8px; font-size:12px; }
  .opportunity-meta { flex-direction:column; gap:6px; }
  .opportunity-meta span:last-child { max-width:100%; text-align:left; }
  .toolbar { flex-wrap:wrap; align-items:stretch; gap:14px; margin:20px 0; }
  .search { width:100%; min-height:48px; }
  .search input { font-size:16px; }
  .direction-filter { width:100%; justify-content:space-between; gap:12px; }
  .direction-filter select { min-width:0; max-width:72%; font-size:13px; }
  .filter { min-height:40px; font-size:11px; }
  .toolbar>.filters,.filter-row { min-width:0; max-width:100%; flex-wrap:nowrap; gap:6px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
  .toolbar>.filters { width:100%; }
  .filters::-webkit-scrollbar,.filter-row::-webkit-scrollbar { display:none; }
  .filters .filter,.filter-row .filter { flex:0 0 auto; white-space:nowrap; }
  .filter:focus-visible { outline-offset:-3px; }
  .project-picker select { font-size:16px; }
  .events-table,.events-table tbody { display:block; }
  .events-table thead { display:none; }
  .events-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; padding:20px; border-bottom:1px solid var(--line); }
  .events-table tr:last-child { border-bottom:0; }
  .events-table td { display:block; padding:0; border:0; }
  .events-table td:has(.event-copy) { grid-column:1/-1; grid-row:2; }
  .events-table .company-name { font-size:15px; }
  .events-table .sub { font-size:11px; }
  .events-table .event-copy { font-size:13px; }
  .events-table td.cell-next { grid-column:1/-1; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
  .events-table td.cell-next:before { content:'Следующий ход'; display:block; margin-bottom:5px; color:var(--fg); font:10px var(--mono); text-transform:uppercase; letter-spacing:.04em; }
  .events-table td.cell-arrow,.events-table td.cell-channels { display:none; }
  .tag { font-size:10px; }
  .mini-project { padding:22px; }
  .agents-intro { padding:22px; }
  .agents-intro h2 { font-size:25px; }
  .drawer { width:100%; border-left:0; }
  .drawer-head { gap:16px; padding:22px 18px; }
  .drawer-head h2 { font-size:27px; }
  .drawer-scroll { padding:20px 18px; }
  .context-box,.local-form { padding:18px; }
  .context-box h3 { font-size:22px; }
  .drawer-actions .btn { flex:1; min-height:46px; padding:10px 12px; font-size:12px; }
  .form-row { grid-template-columns:1fr; gap:0; }
  .local-form textarea,.local-form input,.local-form select { font-size:16px; }
  .form-foot { flex-direction:column; align-items:stretch; gap:16px; }
  .form-foot p { max-width:100%; }
  .form-foot .btn { min-height:46px; }
  .project-party { align-items:flex-start; flex-direction:column; gap:6px; }
  .project-party span { max-width:100%; text-align:left; }
  .source-details { padding:18px 20px; }
  .auth-header { height:78px; padding:0 22px; }
  .auth-logo { width:118px; }
  .auth-main { margin-top:30px; }
  .auth-card { padding:26px; }
  .auth-card h1 { font-size:32px; }
  .auth-footer { font-size:9px; }
}
@media(prefers-reduced-motion:no-preference) {
  button,a { transition:background-color .18s,color .18s,border-color .18s; }
  #toast { transition:opacity .18s,transform .18s; }
}

/* Shared workspace: forms and audit follow the accepted cabinet system. */
.workspace-create{margin:0 0 24px;padding:20px 24px}.workspace-create summary{cursor:pointer;font-weight:700}.workspace-create form{padding-top:20px}.workspace-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.workspace-create label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var(--muted)}.workspace-create input,.workspace-create select{width:100%;min-height:44px;background:var(--surface);color:var(--fg);border:1px solid var(--line);border-radius:0;padding:10px 12px;font:inherit;font-size:16px}.workspace-create select[multiple]{min-height:110px}.workspace-feedback{min-height:1.5em;margin:12px 0;overflow-wrap:anywhere}.workspace-project{padding:24px}.workspace-project h2{margin:14px 0;font-size:22px}.workspace-project h2 a{color:inherit}.workspace-summary{margin-top:24px}.workspace-summary table{width:100%;table-layout:auto}.workspace-person,.workspace-event{padding:24px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.workspace-person{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}.workspace-person h2,.workspace-event h3{margin:0 0 10px}.workspace-person p{margin:8px 0}.workspace-person-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.workspace-person .workspace-feedback{grid-column:1/-1}.workspace-summary td{padding:16px 24px;white-space:normal}.workspace-event .meta{margin-bottom:12px}
@media(max-width:700px){.workspace-fields{grid-template-columns:1fr}.workspace-create,.workspace-project,.workspace-person,.workspace-event{padding:18px}.workspace-person{grid-template-columns:1fr}.workspace-person-actions{align-items:flex-start}.workspace-summary th,.workspace-summary td{padding:12px}.workspace-summary td:last-child{width:42%}.workspace-person .mono{font-size:11px}}

.workspace-fields>div{display:grid;gap:8px;align-content:start}

.workspace-agent-name{font-family:"IBM Plex Mono",monospace;text-transform:none;letter-spacing:0;font-size:12px}

.workspace-person .workspace-feedback:empty{display:none}

/* Personal MCP connections use the existing AMR palette and form language. */
.agent-scopes{border:1px solid var(--line);padding:16px;grid-column:1/-1;min-width:0}
.agent-scopes legend{padding:0 6px}
.agent-scopes label{display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:12px 0;text-transform:none;letter-spacing:normal}
.agent-scopes input[type=checkbox]{width:18px;height:18px;min-height:18px;flex:0 0 18px;padding:0;margin:2px 0;accent-color:var(--accent)}
.agent-connection{border-top:1px solid var(--line);padding:18px 0;margin-top:14px}
.agent-connection-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.agent-setup{padding:24px;margin-bottom:24px;min-width:0}
.agent-setup[hidden]{display:none}
.agent-setup p{margin:16px 0;line-height:1.65}
.agent-setup textarea{display:block;width:100%;min-height:100px;box-sizing:border-box;resize:vertical;font-family:var(--mono);font-size:12px;margin:8px 0 12px;overflow-wrap:anywhere;white-space:pre-wrap;background:var(--surface);color:var(--fg);border:1px solid var(--line);padding:12px}
.agent-setup label{display:block;margin-top:20px}
.agent-setup code{overflow-wrap:anywhere}
.workspace-person>div{min-width:0}

.workspace-event .agent-attribution{text-transform:none}
.workflow-editor{border:1px solid var(--line);padding:16px;margin-bottom:12px}.workflow-request{grid-column:1/-1;min-width:0;border:1px solid var(--line);padding:16px}.workflow-request legend{padding:0 8px}.workflow-request .panel-note{margin:14px 0 0}.workflow-editor summary{cursor:pointer}.workflow-editor form{padding-top:16px}.workflow-editor textarea{width:100%;min-height:100px;background:var(--surface);color:var(--fg);border:1px solid var(--line);font:inherit;padding:12px}.workflow-editor input,.workflow-editor select{min-width:0}.workflow-request input{max-width:100%}
.workflow-dossier{padding:18px 0;margin:20px 0;border-top:1px solid var(--line)}.workflow-dossier.panel{padding:24px}.workflow-task{padding:18px 0;border-bottom:1px solid var(--line)}.workflow-task h3{font-size:18px;margin:10px 0}.workflow-task p{margin:8px 0;overflow-wrap:anywhere}.workflow-task .workflow-editor{margin-top:14px}.workflow-wide{grid-column:1/-1}.workflow-dossier>h3{margin-bottom:18px}
.workflow-fact{padding:18px 0;border-bottom:1px solid var(--line)}.workflow-fact p,.workflow-material p{margin:10px 0;overflow-wrap:anywhere}.workflow-material{padding:16px;border:1px solid var(--line);margin:12px 0}.workflow-attest{flex-direction:row!important;align-items:flex-start!important}.workflow-attest input{width:18px!important;min-height:18px!important;height:18px;flex:0 0 18px;padding:0;margin-top:3px}.workflow-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px}.workflow-fact details{margin:12px 0}
@media(max-width:700px){.workflow-compare{grid-template-columns:1fr}.workflow-dossier.panel{padding:18px}}

.journal-filters{margin-bottom:var(--space-5,24px)}.journal-pagination{display:flex;gap:12px;flex-wrap:wrap;padding-top:20px}

/* Manager workflow: preserve the AMR palette and make the next action clear. */
.manager-next-step{border-left:3px solid var(--accent);padding:12px 16px;margin:20px 0}.manager-next-step p{margin:8px 0 0}.manager-workboard{margin:20px 0;padding:16px;border:1px solid var(--line)}.manager-workboard>h3{font-size:18px;margin:0 0 16px}.manager-money{display:block;margin:6px 0 0;font-variant-numeric:tabular-nums}.drawer-head .text-link{display:inline-block;margin-bottom:12px}

.manager-source-ref[hidden]{display:none}

.manager-next-step[hidden]{display:none}
