:root {
  color-scheme: light;
  --bg: #f4f7fc;
  --paper: #fff;
  --ink: #202b45;
  --muted: #5f6c82;
  --line: #dfe6f1;
  --accent: #315fe9;
  --soft: #edf2ff;
  --amber: #946009;
  --danger: #b73539;
  --radius: 12px;
  --success: #157a54;
  --success-soft: #e9f6ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font:
    14px/1.55 "Golos Text",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--ink);
  text-underline-offset: 3px;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
:focus-visible {
  outline: 2px solid var(--accent);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
[hidden] {
  display: none !important;
}
.icon,
.brand-mark,
.empty-icon {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  z-index: 30;
  left: 16px;
  top: -70px;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus {
  top: 16px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 32px 18px 16px;
  display: flex;
  flex-direction: column;
  background: #f5f7fc;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.7px;
  text-decoration: none;
  line-height: 1.3;
}
.sidebar .brand {
  margin-left: 10px;
}
.brand-mark {
  width: 32px;
  height: 32px;
}
.brand-subtitle {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
  margin-top: 46px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  padding: 11px 13px;
  text-decoration: none;
  color: #53617b;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 550;
  transition:
    background 0.15s,
    color 0.15s;
}
.sidebar nav a:hover {
  background: #e7edfb;
  color: var(--accent);
}
.sidebar nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px #315fe924;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-note {
  margin: 0 12px 19px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  max-width: 24ch;
}
.api-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #465675;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.api-link .icon {
  width: 15px;
  height: 15px;
}
.api-link:hover {
  color: var(--ink);
}
.account-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 17px 4px 0;
  border-top: 1px solid var(--line);
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--soft);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
  flex: 0 0 auto;
  color: var(--accent);
  border: 1px solid #d2dfff;
}
.account-name {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.account-row .icon-button {
  margin-left: auto;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}
.workspace main {
  margin-left: 238px;
  padding: 43px 42px 24px;
  max-width: 1850px;
  min-height: 100vh;
  background: var(--paper);
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 29px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 10px;
}
.page-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  max-width: 76ch;
}
h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.35px;
}
h3 {
  font-weight: 500;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 550;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
  border-color: #ccd7e8;
}
.button .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}
.button:hover {
  background: #edf2ff;
  border-color: #99afea;
  color: #244dc4;
}
.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    0 3px 7px #315fe92b,
    inset 0 1px 0 #ffffff1f;
}
.primary:hover {
  color: #fff;
  background: #244dcc;
  border-color: #244dcc;
  box-shadow: 0 5px 12px #315fe933;
}
.quiet {
  background: transparent;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  color: #566581;
  background: transparent;
}
.icon-button:hover {
  color: var(--accent);
  background: #e8efff;
}
.data-overview {
  padding: 0 0 25px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.dataset-line {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 44px;
  min-height: 88px;
  padding: 3px 0 26px;
  align-items: center;
}
.dataset-line > span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}
.dataset-line strong {
  color: var(--ink);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.9px;
  font-variant-numeric: tabular-nums;
}
.ingestion {
  padding: 14px 17px;
  border: 1px solid var(--line);
  background: #f4faf7;
  border-radius: 10px;
  border-color: #d6e9df;
}
.ingestion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}
#sync-label {
  display: flex;
  align-items: center;
  font-weight: 500;
}
#sync-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot,
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 7px;
  flex: 0 0 auto;
}
.status-dot.warning {
  background: var(--amber);
}
.progress-track {
  position: relative;
  height: 5px;
  margin: 12px 0 9px;
  background: #e0e9e5;
  border-radius: 3px;
  overflow: hidden;
}
.progress-track > div {
  position: absolute;
  inset: 0 auto 0 0;
  max-width: 100%;
  min-width: 0;
  border-radius: 3px;
  transition: width 0.35s ease;
}
#archive-progress {
  background: #adc0ea;
}
#analytics-progress {
  background: var(--success);
}
.progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.legend-dot.archive {
  background: #93abe0;
}
.sync-notice {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--amber);
}
.filters {
  border: 1px solid #dde5f3;
  border-radius: 14px;
  padding: 18px;
  background: var(--paper);
  box-shadow: 0 2px 8px #1e2a4508;
}
.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.9fr 1fr 1fr;
  gap: 16px;
  align-items: end;
}
.filter-grid.sources-grid {
  grid-template-columns: 1.9fr 1.4fr 1.4fr 1fr 1fr;
}
.range-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  margin-top: 7px;
  padding: 0 4px 0 12px;
  border: 1px solid #c8d3e5;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 1px 2px #202b4505;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.range-inputs:hover {
  border-color: #8b9fc7;
}
.range-inputs:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #315fe919;
}
.range-inputs input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
.range-inputs input:last-child {
  flex: 1.3 1 0;
}
.range-inputs input:hover,
.range-inputs input:focus {
  border: 0;
  box-shadow: none;
}
.range-inputs input::placeholder {
  color: #95a2b7;
}
.range-inputs input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.range-inputs input::-webkit-outer-spin-button,
.range-inputs input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.range-sep {
  color: #b3bdcd;
  font-weight: 400;
  user-select: none;
}
.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
a.button {
  text-decoration: none;
}
a.button:hover {
  text-decoration: none;
}
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.th-sort:hover {
  color: #183eaa;
}
.th-sort.active {
  color: #2756cc;
}
.sort-mark {
  font-size: 9px;
  opacity: 0.55;
}
.th-sort.active .sort-mark {
  opacity: 1;
}
.data-table .check {
  width: 38px;
  text-align: center;
}
.data-table .check input {
  width: 16px;
  height: 16px;
  min-width: 0;
  margin: 0;
  box-shadow: none;
  vertical-align: middle;
}
label,
.field {
  display: block;
  font-size: 12px;
  font-weight: 550;
  color: #3e4e6c;
  min-width: 0;
}
input,
select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 10px 12px;
  margin-top: 7px;
  border: 1px solid #dfe3de;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  box-shadow: 0 1px 2px #202b4505;
  border-color: #c8d3e5;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder {
  color: #69778c;
  opacity: 1;
}
input:hover,
select:hover {
  border-color: #8b9fc7;
}
input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #315fe919;
}
select:disabled {
  background: #eef1f6;
  color: #7a8599;
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}
.input-with-icon {
  display: block;
  position: relative;
}
.input-with-icon > .icon {
  position: absolute;
  top: 13px;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--accent);
  pointer-events: none;
}
.input-with-icon input {
  padding-left: 37px;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #e7edf8;
}
.filter-help {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0 16px 0 0;
  max-width: 72ch;
}
.single-search,
.phone-search {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.single-search {
  max-width: 760px;
  margin: 0 0 29px;
}
.single-search label {
  flex: 1;
}
.single-search .button,
.phone-search .button {
  min-height: 44px;
}
.theme-caption {
  margin: 0 0 4px;
  max-width: 90ch;
}
.theme-caption h2 {
  font-size: 17px;
}
.theme-caption p {
  margin: 6px 0 0;
  line-height: 1.85;
}
.svo-summary {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  margin: 14px 0 22px;
}
.svo-summary .detail-stats {
  margin-bottom: 0;
}
.badge.svo-badge {
  background: var(--success-soft);
  color: var(--success);
  border-color: #cfe8d8;
}
.badge.svo-new {
  background: #fdeaea;
  color: #b01c2e;
  border-color: #f3c9cd;
}
.theme-cell {
  max-width: 320px;
}
.theme-cell .theme-chips {
  margin-left: 0;
}
.theme-editor {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.theme-editor .footnote {
  margin: 0 0 10px;
}
.theme-editor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.theme-editor-row label {
  flex: 1 1 240px;
}
.theme-editor-row .button {
  height: 44px;
}
.theme-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.badge.theme-chip {
  background: var(--success-soft);
  color: var(--success);
  border-color: #cfe8d8;
  font-weight: 500;
}
.badge.theme-chip.manual {
  background: #0f5132;
  color: #e9f7ef;
  border-color: #0b3d27;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  margin: 10px 0 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}
.seg-label {
  padding: 0 8px 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.seg-btn {
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.seg-btn:hover {
  color: var(--accent);
}
.seg-btn.active {
  background: #fff;
  color: #244dc4;
  box-shadow: 0 1px 2px rgba(20, 40, 90, 0.12);
}
.phone-search-panel {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 22px;
  background: #f6f8fe;
  border-color: #d9e2f5;
}
.phone-search label {
  width: 420px;
}
.phone-search-panel .footnote {
  margin-bottom: 0;
}
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 27px 0 15px;
}
.result-count {
  display: inline-block;
  vertical-align: middle;
  background: var(--soft);
  border-radius: 6px;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 11px;
  letter-spacing: 0;
  color: #3156c9;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  border: 1px solid #d6e1ff;
}
.result-count:empty {
  display: none;
}
.subtle {
  font-size: 12px;
  color: var(--muted);
}
.table-wrap {
  position: relative;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 82px;
  border-color: #d8e1ee;
  box-shadow: 0 2px 6px #202b4504;
}
.table-wrap[aria-busy="true"] {
  opacity: 0.72;
  pointer-events: none;
  border-color: var(--accent);
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 14px 17px;
  background: #f0f4fb;
  border-bottom: 1px solid var(--line);
  color: #455777;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.data-table td {
  padding: 15px 17px;
  border-bottom: 1px solid #e8edf5;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #f0f5ff;
}
.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table .name-cell {
  min-width: 190px;
  max-width: 360px;
  overflow-wrap: anywhere;
}
.name-link {
  padding: 3px 0;
  background: none;
  border: 0;
  color: #2756cc;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  line-height: 1.6;
  overflow-wrap: anywhere;
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  border-radius: 5px;
  max-width: 100%;
}
.name-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #183eaa;
}
.minor {
  display: block;
  margin-top: 4px;
  color: #617089;
  font-size: 11px;
  font-weight: 400;
}
.badge {
  display: inline-flex;
  padding: 4px 8px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  border: 1px solid #cfe8d8;
  font-weight: 500;
}
.badge.review {
  color: var(--amber);
  background: #fff4db;
  border-color: #f1db9e;
}
.theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.badge.theme-tag {
  background: var(--success-soft);
  color: var(--success);
  border-color: #cfe8d8;
}
.badge.theme-tag.manual {
  background: #0f5132;
  color: #e9f7ef;
  border-color: #0b3d27;
}
.bar-cell {
  min-width: 105px;
}
.share-track {
  width: 72px;
  height: 4px;
  background: #e2eaff;
  border-radius: 2px;
  margin: 5px 0 0 auto;
}
.share-track i {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pagination > div {
  display: flex;
  gap: 7px;
}
.pagination .button {
  min-height: 38px;
  padding: 6px 13px;
  font-size: 12px;
}
.empty {
  padding: 42px 26px;
  color: var(--muted);
  max-width: 80ch;
  font-size: 13px;
}
.empty-phone {
  padding: 62px 24px 65px;
  max-width: none;
  text-align: center;
}
.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  stroke-width: 1.5;
  color: var(--accent);
  padding: 12px;
  background: var(--soft);
  border-radius: 16px;
}
.empty-phone h2 {
  color: var(--ink);
  font-size: 17px;
}
.empty-phone p {
  max-width: 45ch;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.error {
  color: var(--danger);
}
.footnote {
  color: var(--muted);
  font-size: 11px;
  max-width: 100ch;
  line-height: 1.8;
}
.guide {
  max-width: 880px;
}
.guide section {
  display: grid;
  grid-template-columns: 235px 1fr;
  gap: 8px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.guide h2 {
  font-size: 15px;
}
.guide p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.guide section a {
  grid-column: 2;
  width: fit-content;
  font-size: 12px;
}
.workspace footer {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
dialog {
  position: fixed;
  inset: 12px 12px 12px auto;
  width: min(880px, calc(100vw - 24px));
  height: calc(100% - 24px);
  max-height: none;
  max-width: none;
  margin: 0;
  padding: 29px 30px 36px;
  border: 1px solid #e2e6df;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 70px #202b452e;
  border-color: #d8e2f3;
}
dialog::backdrop {
  background: #16274666;
}
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 25px;
  border-bottom: 2px solid #e1e9fa;
}
.detail-head h2 {
  font-size: 24px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  letter-spacing: -0.65px;
}
.detail-head p {
  margin: 0 0 8px;
}
.detail-head .icon-button {
  flex: 0 0 auto;
  background: var(--soft);
  color: var(--accent);
}
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 38px;
  margin-bottom: 22px;
}
.detail-stats strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  color: #244dc4;
}
.detail-stats span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  max-width: 23ch;
}
.notice {
  padding: 13px 16px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--amber);
  background: #fff5df;
  border: 1px solid #f0e8d6;
  border-radius: 8px;
  border-color: #f1db9e;
}
.detail-table-title {
  font-size: 15px;
  margin: 27px 0 14px;
}
.detail-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 26px;
  z-index: 20;
  max-width: min(400px, calc(100vw - 32px));
  padding: 14px 19px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 8px 25px #25272624;
}
/* A distinct entry screen; the workspace keeps its light background. */
.login-page {
  background: #fff;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100svh;
  gap: 24px;
  padding: 24px;
}
.login-story {
  display: flex;
  flex-direction: column;
  padding: 38px 44px 26px;
  border-radius: 22px;
  background: #2756da;
  min-width: 0;
  color: #fff;
}
.login-story .brand {
  font-size: 24px;
  color: #fff;
}
.story-content {
  margin: auto 0;
  padding: 66px 0 36px;
}
.story-content h2 {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 500;
  letter-spacing: -2px;
  line-height: 1.18;
}
.story-content > p {
  max-width: 40ch;
  font-size: 14px;
  color: #e5edff;
  line-height: 1.85;
  margin: 23px 0 0;
}
.story-footnote {
  font-size: 11px;
  color: #e0eaff;
  margin: 0;
}
.connection-map {
  position: relative;
  max-width: 480px;
  width: 100%;
  aspect-ratio: 480 / 260;
  margin: 37px auto 0;
}
.connection-lines {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #a7c0ff;
  stroke-width: 1.5;
}
.map-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #d9dfd3;
  border-radius: 9px;
  color: #244dc4;
  background: #fff;
  font-size: 11px;
  box-shadow: 0 5px 18px #122e7b24;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  border-color: #fff;
  font-weight: 500;
}
.map-node .icon {
  width: 15px;
  height: 15px;
}
.map-sources {
  top: 24.23%;
  left: 22.92%;
}
.map-cabinets {
  top: 24.23%;
  left: 77.08%;
}
.map-phones {
  top: 75.77%;
  left: 22.92%;
}
.map-dates {
  top: 75.77%;
  left: 77.08%;
}
.map-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  color: var(--accent);
  background: #fff;
  box-shadow:
    0 0 0 10px #2756da,
    0 0 0 11px #a7c0ff;
}
.map-center .brand-mark {
  width: 30px;
  height: 30px;
}
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.login-form-content {
  width: 100%;
  max-width: 350px;
}
.login-mobile-brand {
  display: none;
}
.login-form-content h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0 0 12px;
}
.login-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 33px;
}
#login-form label {
  margin-top: 19px;
  font-size: 12px;
  color: #3e4e6c;
}
#login-form input {
  height: 48px;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  margin-top: 9px;
}
.password-field {
  position: relative;
}
#login-form .password-field input {
  padding-right: 47px;
}
.password-field .icon-button {
  position: absolute;
  right: 5px;
  top: 5px;
}
.login-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 27px;
  border-radius: 9px;
  font-size: 14px;
  justify-content: space-between;
  padding-inline: 17px;
}
.login-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  margin: 21px 0 0;
}
.login-note .icon {
  width: 13px;
  height: 13px;
}
.login-error {
  font-size: 12px;
  color: var(--danger);
  background: #fcf3f0;
  border-radius: 7px;
  padding: 10px 12px;
  margin: 16px 0 -6px;
}

.brand > .brand-mark {
  width: 40px;
  height: 40px;
  padding: 8px;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  box-shadow: 0 3px 9px #315fe925;
}
.login-story .brand > .brand-mark {
  color: var(--accent);
  background: #fff;
  box-shadow: none;
}
.page-title-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 11px;
}
.page-title-row h1 {
  margin: 0;
}
.page-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--accent);
  background: var(--soft);
  border-radius: 13px;
}
.page-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}
.button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}
.button:disabled {
  box-shadow: none;
}
.button[aria-busy="true"] .icon {
  animation: button-spin 0.9s linear infinite;
}
@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}
.dataset-stat {
  display: flex;
  align-items: center;
  gap: 13px;
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--accent);
  background: var(--soft);
  border-radius: 12px;
}
.stat-icon .icon {
  width: 22px;
  height: 22px;
}
.stat-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-copy > span {
  color: var(--muted);
  font-size: 12px;
}
.metric-sources .stat-icon {
  color: #087c85;
  background: #e5f5f6;
}
.metric-themes .stat-icon {
  color: #6b3fd4;
  background: #f0ebfd;
}
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-label .icon {
  width: 14px;
  height: 14px;
  color: #4a66a8;
}
.source-filter .field-label {
  color: #244dc4;
}
.source-filter .field-label .icon {
  color: var(--accent);
}
.name-link > .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: #6686d4;
}
.name-link > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.source-link > .icon {
  color: #16858c;
}
.name-cell > .minor {
  padding-left: 26px;
}
.badge .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}
.result-count {
  font-variant-numeric: tabular-nums;
}
.guide section a {
  color: var(--accent);
  font-weight: 500;
}
.login-note .icon {
  color: var(--accent);
}

@media (min-width: 1800px) {
  .workspace main {
    margin-right: auto;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 218px;
    padding-inline: 13px;
  }
  .workspace main {
    margin-left: 218px;
    padding: 34px 26px 24px;
  }
  .filter-grid,
  .filter-grid.sources-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filter-grid.sources-grid > .source-filter {
    grid-column: 1 / -1;
  }
  .dataset-line {
    gap: 18px 28px;
  }
  .dataset-stat {
    gap: 10px;
  }
  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .dataset-line strong {
    font-size: 24px;
  }
  .results-head > .subtle {
    max-width: 40ch;
    text-align: right;
  }
  .login-story {
    padding: 32px;
  }
  .login-form-panel {
    padding: 32px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 194px;
    padding-inline: 10px;
  }
  .sidebar .brand {
    font-size: 20px;
    margin-left: 7px;
    gap: 8px;
  }
  .brand-subtitle {
    font-size: 9px;
  }
  .sidebar nav a {
    font-size: 12px;
    padding-inline: 10px;
    gap: 9px;
  }
  .workspace main {
    margin-left: 194px;
    padding: 29px 23px 20px;
  }
  .page-head {
    align-items: flex-start;
  }
  .filter-actions {
    flex-wrap: wrap;
  }
  .filter-help {
    flex-basis: 100%;
    margin: 0 0 5px;
    max-width: none;
  }
  .filter-actions .button[type="reset"] {
    margin-left: auto;
  }
  .results-head > .subtle {
    display: none;
  }
  .guide section {
    grid-template-columns: 1fr;
  }
  .guide section a {
    grid-column: 1;
  }
  .login-shell {
    gap: 0;
    padding: 16px;
    grid-template-columns: 1fr 1fr;
  }
  .login-story {
    padding: 27px;
  }
  .login-form-panel {
    padding: 28px;
  }
  .story-content h2 {
    font-size: 34px;
    letter-spacing: -1.4px;
  }
  .map-node {
    font-size: 9px;
    padding: 9px;
    gap: 5px;
  }
  .map-center {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 20px 18px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin: 0;
    font-size: 21px;
  }
  .sidebar .brand-mark {
    width: 36px;
    height: 36px;
    padding: 7px;
    border-radius: 10px;
  }
  .brand-subtitle {
    font-size: 9px;
    margin-top: 3px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
    margin-top: 20px;
    padding-bottom: 2px;
  }
  .sidebar nav a {
    min-height: 40px;
    padding: 9px 11px;
    white-space: nowrap;
    font-size: 11px;
  }
  .sidebar nav .icon {
    width: 16px;
    height: 16px;
  }
  .sidebar-bottom {
    position: absolute;
    top: 24px;
    right: 19px;
    padding: 0;
    margin: 0;
  }
  .sidebar-note,
  .api-link,
  .account-avatar,
  .account-name {
    display: none;
  }
  .account-row {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .account-row .icon-button {
    width: 36px;
    height: 36px;
  }
  .workspace main {
    margin: 0;
    padding: 28px 18px 20px;
    min-height: auto;
  }
  .page-head {
    gap: 12px;
    margin-bottom: 26px;
  }
  h1 {
    font-size: 26px;
  }
  .page-head p {
    font-size: 12px;
    max-width: 45ch;
  }
  #refresh {
    width: 38px;
    min-height: 38px;
    padding: 9px;
  }
  #refresh span {
    display: none;
  }
  .dataset-line {
    gap: 18px 24px;
  }
  .dataset-stat {
    gap: 9px;
  }
  .stat-copy > span {
    font-size: 11px;
  }
  .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .stat-icon .icon {
    width: 18px;
    height: 18px;
  }
  .page-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .page-icon .icon {
    width: 21px;
    height: 21px;
  }
  .page-title-row {
    gap: 10px;
  }
  .dataset-line strong {
    font-size: 22px;
  }
  .data-overview {
    margin-bottom: 22px;
    padding-bottom: 21px;
  }
  .ingestion {
    padding: 12px;
  }
  .ingestion-head {
    align-items: flex-start;
    gap: 10px;
  }
  .ingestion-head,
  #sync-time,
  .progress-legend {
    font-size: 10px;
  }
  .filters {
    padding: 15px;
  }
  .filter-grid {
    gap: 15px 12px;
  }
  .filter-grid .cabinet-filter,
  .filter-grid .source-filter,
  .filter-grid > .field.range {
    grid-column: 1 / -1;
  }
  input,
  select {
    font-size: 16px;
  }
  input::placeholder {
    font-size: 12px;
  }
  .filter-help {
    font-size: 11px;
  }
  .filter-actions .button {
    flex: 1;
    padding-inline: 10px;
  }
  .filter-actions .primary {
    flex: 2;
  }
  .results-head {
    margin-top: 24px;
  }
  .data-table th,
  .data-table td {
    padding-inline: 14px;
  }
  .single-search {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .single-search .button {
    align-self: flex-start;
  }
  .phone-search-panel {
    padding: 17px;
  }
  .phone-search {
    flex-direction: column;
    align-items: stretch;
  }
  .phone-search label {
    width: auto;
  }
  .phone-search .button {
    align-self: flex-start;
  }
  .empty-phone {
    padding: 45px 20px;
  }
  .pagination {
    font-size: 10px;
    gap: 8px;
  }
  .pagination .button {
    padding: 6px 10px;
  }
  dialog {
    inset: 6px;
    width: calc(100vw - 12px);
    height: calc(100% - 12px);
    padding: 23px 18px 30px;
    border-radius: 14px;
  }
  .detail-head h2 {
    font-size: 21px;
  }
  .detail-stats {
    gap: 20px 28px;
  }
  .detail-stats strong {
    font-size: 25px;
  }
  .detail-stats span {
    font-size: 10px;
  }
  .login-shell {
    display: block;
    min-height: 100svh;
    padding: 0;
  }
  .login-story {
    display: none;
  }
  .login-form-panel {
    min-height: 100svh;
    padding: 42px 26px;
  }
  .login-form-content {
    max-width: 370px;
  }
  .login-mobile-brand {
    display: flex;
    margin-bottom: 58px;
    font-size: 23px;
  }
  .login-form-content h1 {
    font-size: 29px;
  }
  #login-form input {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
