@font-face {
  font-family: TolkGlass;
  src: url('homepage/manrope.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: TolkGlass;
  src: url('homepage/manrope-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  color-scheme: dark;
  --canvas: #140b1d;
  --paper: #1f142a;
  --raised: #2b1c37;
  --well: #190f22;
  --ink: #faf4ff;
  --subtle: #cbbad6;
  --line: #493456;
  --input-line: #856d97;
  --accent: #e5c9ff;
  --accent-hover: #f3e2ff;
  --accent-ink: #24142f;
  --selected: #352245;
  --focus: #e5c9ff;
  --success: #c1e9d5;
  --success-line: #466e5e;
  --success-bg: #192d28;
  --error: #ffbbb9;
  --error-bg: #3c202e;
  --radius: 12px;
  font: 16px/1.5 TolkGlass, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2 { line-height: 1.14; font-weight: 650; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.028em; }
h2 { font-size: 1.18rem; letter-spacing: -.012em; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--accent-ink); background: var(--accent); }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 5;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  background: var(--paper);
  border-radius: 6px;
}
.muted { color: var(--subtle); }
.intro { margin-top: 9px; color: var(--subtle); overflow-wrap: anywhere; }
.text-link { font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

.topbar { background: var(--canvas); border-bottom: 1px solid var(--line); }
.topbar-inner, .container { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.topbar-inner { display: flex; min-height: 69px; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex: 0 0 auto; }
.brand-mark { display: block; width: 121px; height: auto; }
.brand-context { padding-left: 20px; border-left: 1px solid var(--line); color: var(--subtle); font-size: .83rem; white-space: nowrap; }
.top-nav { display: inline-flex; align-items: center; min-height: 44px; color: var(--subtle); text-decoration: none; font-size: .9rem; font-weight: 650; }
.top-nav:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.top-nav[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
.auth-nav, .account { margin-left: auto; }
.auth-nav { display: flex; align-items: center; gap: 16px; }
.account { min-width: 0; position: relative; }
.account summary, .direction-picker summary { list-style: none; }
.account summary::-webkit-details-marker, .direction-picker summary::-webkit-details-marker { display: none; }
.account summary { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); font-size: .89rem; font-weight: 600; }
.account-email { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-mobile { display: none; }
.chevron { width: .48rem; height: .48rem; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
details[open] > summary .chevron { transform: translateY(2px) rotate(225deg); }
.account-panel { position: absolute; z-index: 3; right: 0; top: calc(100% + 5px); width: min(17rem, 90vw); padding: 16px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); font-size: .88rem; }
.account-address { font-weight: 650; overflow-wrap: anywhere; }
.account-panel form { margin-top: 14px; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: .93rem;
  line-height: 1.25;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}
.button-primary { color: var(--accent-ink); background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { color: var(--ink); background: var(--paper); border-color: var(--input-line); }
.button-secondary:hover { background: var(--raised); }

.container { padding-block: 41px 72px; }
.messages { list-style: none; padding: 0; margin-bottom: 24px; }
.messages li { padding: 11px 15px; border: 1px solid var(--success-line); background: var(--success-bg); border-radius: 8px; color: var(--success); }
.messages li + li { margin-top: 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head > div, .work-main { min-width: 0; }
.page-head > .button { flex: 0 0 auto; }
.section-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 19px 23px; border-bottom: 1px solid var(--line); }
.count { font-variant-numeric: tabular-nums; }
.direction-list { list-style: none; padding: 0; }
.direction-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 4px 23px; }
.direction-list li + li { border-top: 1px solid var(--line); }
.direction-name { display: grid; gap: 3px; min-width: 0; padding: 11px 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.direction-name:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.direction-list .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.direction-name small { color: var(--subtle); font-size: .84rem; }
.empty-state { padding: 30px clamp(20px, 4vw, 41px); }
.empty-state h2 { font-size: 1.45rem; }
.empty-state p { max-width: 49ch; margin-top: 9px; color: var(--subtle); }
.empty-sections { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 0; margin: 19px 0 23px; list-style: none; color: var(--subtle); font-size: .89rem; }
.empty-sections li + li::before { content: '·'; margin-right: 16px; }

.auth-page .topbar-inner, .auth-page .container { max-width: 1090px; }
.auth-page .container { padding-top: clamp(24px, 5vw, 62px); }
.auth-frame { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: stretch; max-width: 1090px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.auth-panel, .auth-explainer { min-width: 0; padding: clamp(25px, 4vw, 47px); }
.auth-explainer { display: flex; flex-direction: column; justify-content: center; background: var(--raised); border-radius: 0 15px 15px 0; }
.auth-explainer h2 { max-width: 17ch; font-size: clamp(1.4rem, 3.1vw, 1.9rem); letter-spacing: -.028em; }
.auth-explainer > p { max-width: 35ch; margin-top: 13px; color: var(--subtle); }
.structure { margin-top: 28px; }
.structure-top { padding: 0 0 10px; border-bottom: 1px solid var(--input-line); color: var(--accent); font-size: .84rem; font-weight: 650; }
.structure-row { display: grid; grid-template-columns: 17px 1fr; align-items: start; gap: 10px; padding: 9px 0; }
.structure-connector { width: 14px; height: 10px; margin-top: 5px; border-left: 1px solid var(--input-line); border-bottom: 1px solid var(--input-line); border-radius: 0 0 0 3px; }
.structure strong, .structure small { display: block; }
.structure small { margin-top: 2px; color: var(--subtle); font-size: .79rem; }
.auth-explainer .example-caption { margin-top: 8px; color: var(--subtle); font-size: .78rem; }

.login-page .auth-frame { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); min-height: 485px; }
.login-page .auth-panel { align-self: center; padding: clamp(25px, 4vw, 52px); }
.login-page h1 { font-size: clamp(1.9rem, 3.2vw, 2.65rem); font-weight: 750; }
.login-page .form-stack { margin-top: 29px; }
.login-page .form-actions .button { min-width: 128px; }
.login-art { display: grid; align-items: end; position: relative; isolation: isolate; min-width: 0; overflow: hidden; border-radius: 0 15px 15px 0; background: var(--canvas); }
.login-art img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 84% center; }
.login-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--canvas), transparent 47%); }
.login-art-copy { padding: 24px clamp(20px, 3vw, 34px); }
.login-art-copy p { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 750; letter-spacing: -.024em; }
.login-art-copy span { display: block; margin-top: 4px; color: var(--subtle); font-size: .86rem; }

.form-stack { display: grid; gap: 17px; margin-top: 23px; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 14px; }
.field { min-width: 0; }
.field > label, .account-types legend { display: inline-block; margin: 0 0 6px; padding: 0; font-size: .9rem; font-weight: 650; }
.optional { margin-left: 7px; color: var(--subtle); font-size: .77rem; }
.field > :is(input, select, textarea) { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; color: var(--ink); caret-color: var(--focus); background: var(--well); border: 1px solid var(--input-line); border-radius: 7px; }
.field > input::placeholder { color: var(--subtle); opacity: 1; }
.field > :is(input, select, textarea):focus-visible { outline-offset: 2px; }
.field > select { padding-right: 24px; }
.field > textarea { resize: vertical; }
.field-help, .errorlist { margin-top: 6px; font-size: .82rem; }
.field-help { color: var(--subtle); }
.errorlist { padding: 8px 12px; list-style: none; background: var(--error-bg); color: var(--error); border-radius: 6px; }
.errorlist li + li { margin-top: 5px; }
.field-invalid > :is(input, select, textarea) { border-color: var(--error); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; margin-top: 3px; }
.form-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.account-types { min-width: 0; margin: 0; padding: 0; border: 0; }
.type-choice { display: flex; align-items: flex-start; gap: 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.type-choice + .type-choice { margin-top: 6px; }
.type-choice:hover { border-color: var(--input-line); }
.type-choice:has(:checked) { border-color: var(--accent); background: var(--selected); }
.type-choice input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--accent); }
.type-choice strong, .type-choice small { display: block; }
.type-choice strong { font-size: .92rem; line-height: 1.27; font-weight: 650; }
.type-choice small { margin-top: 2px; color: var(--subtle); font-size: .82rem; line-height: 1.38; }
.editor { max-width: 650px; margin-inline: auto; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .88rem; }
.back-chevron { width: .48rem; height: .48rem; margin-left: 2px; border-left: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.editor-panel { margin-top: 8px; padding: clamp(19px, 4vw, 33px); }
.editor-context { margin-top: 8px; color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }

.intake-head .back-link { white-space: nowrap; }
.intake-head .section-actions { flex-shrink: 0; }
.intake-layout { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.intake-panel { padding: clamp(18px, 3vw, 25px); }
.intake-facts { display: grid; gap: 8px; margin-top: 16px; font-size: .9rem; }
.intake-facts > div { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 2px 8px; }
.intake-facts dt { color: var(--subtle); }
.intake-facts dd { overflow-wrap: anywhere; }
.intake-link { margin-block: 16px 11px; }
.intake-disable { margin-top: 11px; }
.lead-intake { padding-block: 13px; border-block: 1px solid var(--line); }
.data-table small.lead-origin { margin-top: 4px; color: var(--accent); }

.work-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 31px; align-items: start; }
.scope-sidebar .back-link { margin: -5px 0 8px; }
.direction-picker { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.direction-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; padding: 10px 11px; font-size: .83rem; font-weight: 650; }
.direction-picker summary:hover { color: var(--accent); }
.direction-picker ul { max-height: 19rem; overflow-y: auto; padding: 3px; border-top: 1px solid var(--line); list-style: none; }
.direction-picker a { display: flex; min-height: 44px; flex-direction: column; justify-content: center; padding: 7px 8px; border-radius: 5px; color: var(--ink); font-size: .88rem; text-decoration: none; overflow-wrap: anywhere; }
.direction-picker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.direction-picker a[aria-current] { background: var(--selected); color: var(--accent); font-weight: 650; }
.direction-picker a:focus-visible { outline-offset: -2px; }
.direction-picker small { color: var(--subtle); font-weight: 400; }
.project-context { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 11px; overflow-wrap: anywhere; }
.project-context strong { font-size: 1.07rem; font-weight: 700; }
.project-context span { font-size: .88rem; color: var(--subtle); }
.section-nav { display: flex; flex-wrap: wrap; gap: 0 21px; margin-top: 6px; border-bottom: 1px solid var(--line); }
.section-nav a { display: inline-flex; align-items: center; min-height: 46px; margin-bottom: -1px; padding: 1px 1px 0; border-bottom: 1px solid transparent; color: var(--subtle); text-decoration: none; font-size: .95rem; font-weight: 650; }
.section-nav a:hover { color: var(--accent); }
.section-nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.section-head { margin-top: 25px; }

.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
.data-table th, .data-table td { padding: 13px 12px; vertical-align: top; overflow-wrap: anywhere; }
@media (min-width: 701px) {
  .data-table :is(th, td):first-child { padding-left: 20px; }
  .data-table :is(th, td):last-child { padding-right: 20px; }
}
.data-table thead { color: var(--subtle); font-size: .8rem; }
.data-table thead th { font-weight: 650; }
.data-table tbody tr { border-top: 1px solid var(--line); }
.data-table tbody th { min-width: 9rem; font-weight: 650; }
.data-table small { display: block; color: var(--subtle); font-size: .83rem; font-weight: 400; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status-label { color: var(--ink); font-weight: 650; }
.table-action { text-align: right; white-space: nowrap; }
.table-action a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 5px 14px; border-top: 1px solid var(--line); font-size: .88rem; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.metrics > div { min-width: 0; padding: 15px 12px 16px; }
.metrics > div + div { border-left: 1px solid var(--line); }
.metrics dt { color: var(--subtle); font-size: .78rem; line-height: 1.35; }
.metrics dd { margin-top: 5px; font-size: clamp(.96rem, 1.55vw, 1.25rem); line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-head { flex-wrap: wrap; }
.report-head p, .report-note { font-size: .83rem; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -2px; }
.report-table { min-width: 640px; }
.report-table td { font-size: .88rem; }
.report-note { padding: 11px 21px; color: var(--subtle); border-top: 1px solid var(--line); }
.report-empty { padding: 17px 21px; color: var(--subtle); }
.report-empty a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 990px) {
  .work-layout { grid-template-columns: 1fr; gap: 15px; }
  .scope-sidebar { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px 16px; }
  .scope-sidebar .back-link { margin: 0; }
  .direction-picker { max-width: min(100%, 19rem); }
}

@media (max-width: 740px) {
  .auth-frame, .login-page .auth-frame { grid-template-columns: minmax(0, 1fr); max-width: 520px; min-height: 0; }
  .auth-explainer { border-radius: 0 0 15px 15px; }
  .auth-explainer h2 { max-width: none; }
  .login-art { min-height: 253px; border-radius: 0 0 15px 15px; }
  .login-art img { height: calc(100% - 56px); object-position: 84% center; }
  .login-art-copy { padding-bottom: 17px; }
  .brand-context { display: none; }
  .topbar-inner, .container { width: calc(100% - 36px); }
  .container { padding-block: 24px 45px; }
  .intake-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .intake-layout { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics > div:nth-child(4) { border-left: 0; }
  .metrics > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .metrics > div:last-child { grid-column: span 2; }
}

@media (max-width: 550px) {
  .topbar-inner { min-height: 60px; gap: 10px; }
  .brand-mark { width: 104px; }
  .topbar-inner > .top-nav, .auth-nav:has(.button) .top-nav, .account-email { display: none; }
  .account-mobile { display: inline; }
  .account summary { font-size: .82rem; }
  .auth-panel, .auth-explainer, .login-page .auth-panel { padding: 24px 18px; }
  .auth-panel .form-stack, .auth-panel .form-pair { gap: 13px; }
  .login-art-copy p { font-size: clamp(1rem, 4.6vw, 1.15rem); }
  .form-pair { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 18px; }
  .scope-sidebar { flex-wrap: wrap; }
  .direction-picker { max-width: 100%; }
  .section-nav { gap: 0 18px; }
  .panel-head, .direction-list li { padding-inline: 15px; }
}

@media (max-width: 700px) {
  .report-table { min-width: 0; }
  .responsive-list, .responsive-list tbody, .responsive-list tr { display: block; }
  .responsive-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .responsive-list tbody tr { padding: 13px 15px; }
  .responsive-list tbody tr:first-child { border-top: 0; }
  .responsive-list tbody :is(th, td) { display: block; min-width: 0; padding: 4px 0; text-align: left; white-space: normal; }
  .responsive-list td[data-label] { display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .responsive-list td[data-label]::before { content: attr(data-label); content: attr(data-label) / ''; color: var(--subtle); font-size: .81rem; text-align: left; }
  .responsive-list .table-action a { min-height: 44px; margin: 0; }
}
