:root {
  color-scheme: light;
  --ink: #20242c;
  --muted: #636b78;
  --line: #e4e7ec;
  --subtle: #f7f8fa;
  --accent: #315bc4;
  --selected: #edf2ff;
  --difference: #fff6e5;
  --shadow: 0 8px 28px #20242c18;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  color: #69717d;
}
button,
a {
  transition:
    background-color 0.14s ease,
    color 0.14s ease;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
input,
select {
  accent-color: var(--accent);
  caret-color: var(--accent);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection {
  background: #d9e5ff;
  color: #17376f;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button svg,
a svg,
summary svg {
  flex-shrink: 0;
}
button:disabled svg {
  opacity: 0.5;
}
.muted,
.missing {
  color: var(--muted);
}
.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 15px;
  z-index: 20;
  background: #fff;
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
.registry-app {
  display: flex;
  min-height: 100dvh;
}
.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: var(--subtle);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 0 12px;
}
.brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: #252d3d;
  border-radius: 7px;
  color: white;
}
.brand-suffix {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: -4px;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav a {
  display: flex;
  gap: 11px;
  align-items: center;
  height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  color: #515967;
}
.sidebar nav a:hover {
  background: #eceff3;
}
.sidebar nav a[aria-current] {
  background: #e8edf7;
  color: #27488b;
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  font-size: 12px;
  color: #606e88;
  font-weight: 500;
}
.saved-nav {
  margin-top: 38px;
  padding: 0 11px;
}
.saved-nav h2 {
  font-size: 12px;
  font-weight: 600;
  color: #687180;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.saved-nav p {
  font-size: 12px;
  color: #6a727f;
  margin-top: 12px;
  line-height: 1.65;
}
.saved-nav button {
  border: 0;
  background: none;
  display: block;
  text-align: left;
  padding: 10px 0;
  width: 100%;
  font-size: 13px;
}
.saved-nav button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-nav button:hover {
  color: var(--accent);
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  gap: 9px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 17px 6px;
}
.avatar {
  background: #e0e5ee;
  color: #4f5c73;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.sidebar-foot strong,
.sidebar-foot div > span {
  display: block;
  font-size: 11px;
}
.sidebar-foot strong {
  font-weight: 600;
}
.sidebar-foot div > span {
  color: var(--muted);
  margin-top: 2px;
}
.workspace {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 54px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.demo-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.demo-label > span {
  height: 6px;
  width: 6px;
  background: #7e8caa;
  border-radius: 50%;
}
main {
  padding: 30px 32px 24px;
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 27px;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  font-weight: 650;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  background: white;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.button:hover {
  background: #f4f6fa;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.primary:hover {
  background: #254cae;
}
.button.primary:disabled {
  background: #e9edf5;
  border-color: #e9edf5;
  color: #646e80;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.search {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid #d8dde5;
  border-radius: 6px;
  height: 35px;
  padding: 0 10px;
  min-width: 235px;
  width: 320px;
  color: var(--muted);
}
.search input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  font-size: 12px;
  background: transparent;
  color: var(--ink);
  height: 100%;
}
.search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search input:focus-visible {
  outline: 0;
}
input::placeholder {
  color: #707987;
}
.search .icon-button {
  height: 24px;
  width: 24px;
  min-height: 24px;
}
.toolbar-space {
  flex: 1;
}
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  background: transparent;
  border-radius: 5px;
  width: 30px;
  height: 30px;
  padding: 0;
}
.icon-button:hover {
  background: #eef1f6;
}
.popover {
  position: relative;
}
.popover summary {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  border: 1px solid #d8dde5;
  padding: 7px 10px;
  border-radius: 6px;
  min-height: 35px;
  background: white;
  white-space: nowrap;
}
.popover summary::-webkit-details-marker {
  display: none;
}
.popover[open] summary,
.popover.has-value summary {
  background: #f1f5ff;
  color: #244eaa;
  border-color: #bfceef;
}
.popover-body {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  min-width: 225px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.toolbar > .popover:last-child .popover-body {
  left: auto;
  right: 0;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 35px;
  padding: 5px 7px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}
.check-option:hover {
  background: var(--subtle);
}
input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}
.menu-action {
  border: 0;
  background: transparent;
  padding: 7px;
  text-align: left;
  color: var(--accent);
  font-size: 12px;
  width: 100%;
}
.field-label {
  display: grid;
  gap: 7px;
  padding: 7px;
  font-size: 12px;
}
.field-label select {
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 220px;
}
.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 57px;
  font-size: 12px;
}
.result-line strong {
  font-weight: 600;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #525e73;
}
.text-button:hover {
  color: var(--accent);
}
.registry-layout {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.registry-results {
  min-width: 0;
  flex: 1;
}
.table-scroll {
  overflow: auto;
  max-height: calc(100dvh - 312px);
  min-height: 280px;
  scrollbar-color: #b5bdcc #f5f6f8;
}
.registry-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  white-space: nowrap;
}
.registry-grid thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.registry-grid th {
  background: var(--subtle);
  color: #616a79;
  text-align: left;
  font-weight: 500;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}
.registry-grid th button {
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  color: inherit;
}
.registry-grid td {
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f4;
  max-width: 275px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.registry-grid th:first-child,
.registry-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  min-width: 247px;
}
.registry-grid th:first-child {
  background: var(--subtle);
}
.registry-grid tr:last-child td {
  border-bottom: 0;
}
.registry-grid tbody tr {
  cursor: pointer;
}
.registry-grid tr:hover td {
  background: #f7f9fc;
}
.registry-grid tr.selected-row td {
  background: #edf2ff;
}
.name-link {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 12px;
  width: 100%;
}
.name-link svg {
  color: #7c879b;
  opacity: 0;
}
.name-link:focus-visible svg,
tr:hover .name-link svg,
.selected-row .name-link svg {
  opacity: 1;
}
.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}
.project-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #65758c;
  display: inline-block;
  flex-shrink: 0;
}
.project-dot.p0 {
  background: #536fc4;
}
.project-dot.p1 {
  background: #aa7c45;
}
.project-dot.p2 {
  background: #468274;
}
.project-dot.p3 {
  background: #8b6daa;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  font-size: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}
.record-detail {
  width: 360px;
  flex: 0 0 360px;
  padding: 21px 23px;
  border-left: 1px solid var(--line);
  background: #fff;
  max-height: calc(100dvh - 270px);
  overflow: auto;
  scrollbar-color: #b5bdcc #fff;
}
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.record-detail h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.02em;
  outline: none;
}
.record-detail > p {
  font-size: 11px;
  margin-top: 6px;
}
.detail-fields {
  margin: 26px 0;
}
.detail-fields > div {
  margin: 0 0 18px;
}
.detail-fields dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-fields dd {
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}
.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.detail-section + .detail-section {
  margin-top: 24px;
}
.detail-section > h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.detail-section .detail-fields {
  margin: 18px 0 0;
}
.related {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.related h3 {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 8px;
}
.related h3 span {
  color: var(--muted);
}
.related > p {
  font-size: 12px;
  margin-top: 10px;
}
.related-link {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 17px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-align: left;
}
.related-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.basis-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.basis-select select {
  background: #fff;
  color: var(--ink);
  border: 1px solid #d8dde5;
  border-radius: 6px;
  padding: 7px 9px;
  min-height: 35px;
  font-size: 12px;
  max-width: 285px;
}
.intersection-toolbar {
  justify-content: space-between;
}
.combinations {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.combination-head,
.combination-row {
  display: grid;
  grid-template-columns: 1fr 145px 20px;
  gap: 25px;
  align-items: center;
  width: 100%;
  padding: 17px 22px;
  text-align: left;
}
.combination-head {
  font-size: 11px;
  color: var(--muted);
  background: var(--subtle);
  padding-top: 11px;
  padding-bottom: 11px;
}
.combination-head > span:nth-child(2) {
  text-align: right;
}
.combination-row {
  border: 0;
  border-top: 1px solid var(--line);
  background: white;
  min-height: 73px;
}
.combination-row:hover:not(:disabled) {
  background: #f7f9fe;
}
.combination-row .project-tag {
  font-size: 14px;
}
.project-pair {
  display: flex;
  align-items: center;
  gap: 24px;
}
.project-pair .project-tag {
  min-width: 114px;
}
.pair-connector {
  color: #949dac;
}
.combination-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
}
.combination-row:disabled .combination-count {
  font-size: 12px;
  font-weight: 400;
}
.combination-row:disabled > svg {
  visibility: hidden;
}
.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}
.comparison-layout {
  display: grid;
  grid-template-columns: 295px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 20px;
  min-height: 570px;
}
.match-list {
  border-right: 1px solid var(--line);
  background: #fcfcfd;
}
.match-list-title {
  padding: 14px 17px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.match-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 19px 15px;
}
.match-item:hover {
  background: #f1f4f9;
}
.match-item.selected {
  background: var(--selected);
}
.match-number {
  font-size: 10px;
  line-height: 23px;
  color: #73809b;
  font-variant-numeric: tabular-nums;
}
.match-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.match-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
}
.match-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.match-projects {
  display: block;
  font-size: 11px;
  color: #576477;
  margin-top: 10px;
}
.match-type {
  display: block;
  font-size: 10px;
  color: #65718a;
  margin-top: 5px;
}
.match-item > svg {
  margin-top: 3px;
  color: #7d8aa2;
}
.comparison-main {
  min-width: 0;
}
.comparison-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 23px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  min-height: 45px;
}
.comparison-nav > div {
  display: flex;
  gap: 4px;
}
.comparison {
  padding: 27px 25px 20px;
}
.comparison-title h2 {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.match-basis {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  color: #6d5b2f;
  font-size: 11px;
  margin-top: 13px;
}
.match-basis svg {
  margin-top: 1px;
  flex-shrink: 0;
}
.match-basis.strong {
  color: #3c655a;
}
.comparison-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--muted);
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #4e596b;
}
.compare-scroll {
  overflow: auto;
  scrollbar-color: #b5bdcc #fff;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.compare-table th,
.compare-table td {
  padding: 14px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.compare-table thead th {
  font-weight: 500;
  background: var(--subtle);
}
.compare-table thead th:first-child {
  width: 110px;
  font-size: 11px;
  color: var(--muted);
}
.compare-table th small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.compare-table tbody th {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.compare-table .different td {
  background: var(--difference);
}
.compare-table .different th {
  color: #695634;
}
.compare-table td.identical {
  text-align: center;
  padding: 30px;
  color: #45675d;
}
.identical svg {
  display: block;
  margin: 0 auto 8px;
}
.compare-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.comparison-main > .record-detail {
  border: 0;
  width: 100%;
  max-height: none;
}
.mobile-back {
  display: none;
}
.empty {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
}
.empty > svg {
  color: #8994a8;
  margin-bottom: 16px;
}
.empty h2 {
  font-size: 18px;
  font-weight: 600;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 20px;
  max-width: 300px;
}
.save-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 15px 0 20px;
}
.save-form label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  width: 290px;
}
.save-form input {
  border: 1px solid #d8dde5;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 12px;
  color: var(--ink);
  width: 100%;
}
.notice {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: 15;
  background: #24334e;
  color: #fff;
  border-radius: 7px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  max-width: calc(100vw - 32px);
}
.notice > svg {
  flex-shrink: 0;
}
.notice .icon-button:hover {
  background: #3d4c67;
}
.project-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.project-list section {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 25px;
  border-bottom: 1px solid var(--line);
}
.project-list section:last-child {
  border: 0;
}
.project-name {
  display: flex;
  align-items: center;
  gap: 17px;
  flex: 1;
}
.project-tile {
  width: 46px;
  height: 46px;
  background: var(--subtle);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #637086;
}
.project-name h2 {
  font-size: 16px;
  font-weight: 600;
}
.project-name p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.project-record-count {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.sample-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 17px;
}
@media (min-width: 1600px) {
  main {
    padding-left: 42px;
    padding-right: 42px;
  }
  .registry-grid td {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .comparison-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .comparison {
    padding: 30px 35px;
  }
  .compare-table th,
  .compare-table td {
    padding: 17px 15px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 180px;
    flex-basis: 180px;
  }
  .brand-suffix {
    display: none;
  }
  main {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .search {
    width: 265px;
  }
  .toolbar-space {
    display: none;
  }
  .record-detail {
    width: 310px;
    flex-basis: 310px;
    padding: 20px;
  }
  .comparison-layout {
    grid-template-columns: 245px minmax(0, 1fr);
  }
  .comparison {
    padding: 22px 17px;
  }
  .compare-table thead th:first-child {
    width: 90px;
  }
  .comparison-title h2 {
    font-size: 18px;
  }
  .comparison-controls {
    flex-wrap: wrap;
  }
  .project-pair {
    gap: 15px;
  }
  .combination-head,
  .combination-row {
    gap: 15px;
  }
}
@media (max-width: 800px) {
  .registry-app {
    display: block;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    height: 57px;
    padding: 0;
    font-size: 17px;
  }
  .brand-suffix {
    display: block;
  }
  .sidebar nav {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
  }
  .sidebar nav a {
    padding: 0 10px;
    font-size: 12px;
    height: 37px;
    gap: 7px;
  }
  .nav-count {
    margin-left: 2px;
  }
  .saved-nav,
  .sidebar-foot {
    display: none;
  }
  .topbar {
    height: 38px;
    padding: 0 20px;
    font-size: 10px;
  }
  .topbar > span:first-child {
    font-size: 10px;
  }
  main {
    padding: 23px 20px;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .registry-grid th:first-child,
  .registry-grid td:first-child {
    min-width: 225px;
  }
  .comparison-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .comparison {
    padding: 20px 15px;
  }
  .compare-table thead th:first-child {
    width: 80px;
  }
  .compare-table {
    font-size: 11px;
  }
  .compare-table th,
  .compare-table td {
    padding: 12px 8px;
  }
  .compare-table .project-tag {
    font-size: 11px;
  }
  .table-scroll {
    max-height: 65dvh;
  }
  .with-detail .registry-results {
    display: none;
  }
  .with-detail .record-detail {
    flex: 1;
    width: 100%;
    max-height: none;
    border: 0;
  }
  .table-footer span:last-child {
    display: none;
  }
  .project-list section {
    gap: 15px;
    padding: 20px;
  }
}
@media (max-width: 620px) {
  main {
    padding: 20px 16px;
  }
  .sidebar {
    padding: 0 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-heading {
    gap: 10px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading > .button {
    font-size: 11px;
    padding: 8px;
    gap: 5px;
    margin-top: 2px;
  }
  .page-heading > .button svg {
    width: 14px;
  }
  .search {
    width: 100%;
    min-width: 0;
  }
  .toolbar {
    gap: 8px;
  }
  .toolbar > .popover:last-child {
    margin-left: auto;
  }
  .result-line {
    align-items: flex-start;
    padding: 14px 0;
    font-size: 11px;
    gap: 10px;
  }
  .result-line > span {
    max-width: 60%;
  }
  .result-line .text-button {
    font-size: 11px;
    white-space: nowrap;
    padding: 0;
  }
  .registry-grid th:first-child,
  .registry-grid td:first-child {
    min-width: 185px;
    max-width: 185px;
    white-space: normal;
  }
  .registry-grid td {
    padding: 12px;
  }
  .registry-grid th {
    padding: 10px 12px;
  }
  .name-link {
    font-size: 11px;
    line-height: 1.6;
  }
  .registry-grid .name-link svg {
    display: none;
  }
  .table-scroll {
    max-height: 60dvh;
  }
  .basis-select {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .basis-select select {
    flex: 1;
    min-width: 0;
    max-width: none;
    font-size: 11px;
  }
  .basis-select > span {
    font-size: 11px;
  }
  .intersection-toolbar {
    gap: 12px;
  }
  .intersection-toolbar > .popover:last-child {
    margin-left: 0;
  }
  .combination-head,
  .combination-row {
    grid-template-columns: 1fr 35px 14px;
    gap: 8px;
    padding: 17px 13px;
  }
  .combination-head {
    font-size: 10px;
    padding: 10px 13px;
  }
  .combination-head > span:nth-child(2) {
    font-size: 0;
  }
  .combination-head > span:nth-child(2)::after {
    content: "Пары";
    font-size: 10px;
  }
  .project-pair {
    gap: 9px;
    flex-wrap: wrap;
  }
  .project-pair .project-tag {
    font-size: 12px;
    min-width: 0;
  }
  .project-pair .project-dot {
    width: 5px;
    height: 5px;
  }
  .combination-count {
    font-size: 13px;
  }
  .combination-row:disabled .combination-count {
    font-size: 10px;
    overflow-wrap: normal;
  }
  .combination-row:disabled {
    grid-template-columns: 1fr 78px 14px;
  }
  .comparison-layout {
    display: block;
    min-height: 0;
    margin-top: 16px;
  }
  .comparison-layout .comparison-main {
    display: none;
  }
  .comparison-layout.mobile-detail .match-list {
    display: none;
  }
  .comparison-layout.mobile-detail .comparison-main {
    display: block;
  }
  .match-list {
    border: 0;
  }
  .match-list-title {
    padding: 12px 17px;
  }
  .match-item {
    padding: 17px;
  }
  .match-item > span:nth-child(2) {
    max-width: 100%;
  }
  .match-item.selected {
    background: white;
  }
  .match-item.selected:focus {
    background: var(--selected);
  }
  .comparison-nav {
    padding: 8px 12px;
    gap: 8px;
  }
  .mobile-back {
    display: flex;
    font-size: 11px;
  }
  .comparison-nav > span {
    margin-left: auto;
  }
  .comparison-title h2 {
    font-size: 18px;
  }
  .comparison {
    padding: 20px 12px;
  }
  .comparison-controls {
    margin-top: 23px;
    font-size: 10px;
    gap: 8px;
  }
  .compare-table thead th:first-child {
    width: 85px;
  }
  .compare-table th,
  .compare-table td {
    padding: 12px 7px;
  }
  .compare-table tbody th {
    font-size: 10px;
    overflow-wrap: normal;
  }
  .compare-table td {
    font-size: 11px;
  }
  .compare-table .project-tag {
    gap: 5px;
    font-size: 10px;
  }
  .compare-table .project-dot {
    width: 5px;
    height: 5px;
  }
  .compare-table th small {
    font-size: 9px;
  }
  .compare-footer {
    gap: 8px;
  }
  .compare-footer .text-button {
    font-size: 10px;
  }
  .match-basis {
    font-size: 10px;
  }
  .project-list section {
    flex-wrap: wrap;
    padding: 20px 16px;
    gap: 16px;
  }
  .project-name {
    min-width: 180px;
  }
  .project-record-count {
    font-size: 12px;
  }
  .project-list .button {
    margin-left: 62px;
  }
  .project-name h2 {
    font-size: 15px;
  }
  .save-form {
    flex-wrap: wrap;
  }
  .save-form label {
    width: 100%;
  }
  .notice {
    right: 16px;
    bottom: 16px;
  }
  .popover-body {
    min-width: 205px;
  }
  .saved-nav {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (pointer: coarse) {
  .button,
  .icon-button,
  .popover summary,
  .text-button,
  .sidebar nav a {
    min-height: 42px;
  }
  .check-option {
    min-height: 42px;
  }
  .search {
    height: 42px;
  }
  .basis-select select {
    min-height: 42px;
  }
  .inline-check {
    min-height: 40px;
  }
}
.mobile-saved {
  display: none;
}
@media (max-width: 800px) {
  .mobile-saved {
    display: block;
  }
}
/* Main application integration: shared dialogs retain their working behavior. */
.sidebar .brand {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.sidebar nav button {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: #515967;
  text-align: left;
  width: 100%;
  font-size: 13px;
}
.sidebar nav button:hover {
  background: #eceff3;
}
.sidebar nav button[aria-current] {
  background: #e8edf7;
  color: #27488b;
  font-weight: 600;
}
.sidebar .nav-count {
  font-size: 10px;
}
.sidebar-foot .icon-button {
  margin-left: auto;
  flex-shrink: 0;
}
.saved-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-actions,
.result-actions,
.pagination-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-actions {
  gap: 20px;
}
.result-actions select {
  font-size: 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  max-width: 150px;
}
.registry-app main {
  min-width: 0;
}
.registry-app main > div[hidden] {
  display: none;
}
.registry-app .preview-current-collection {
  margin: 0 0 12px;
}
.legacy-filter-note {
  font-size: 12px;
  background: var(--difference);
  padding: 12px 15px;
  margin-top: 12px;
  color: #695634;
}
.registry-app .record-detail {
  flex-basis: 360px;
}
.registry-app .record-detail .preview-record-origin {
  display: none;
}
.registry-app .record-detail .preview-record-phone {
  font-size: 15px;
  margin: 16px 0;
}
.registry-app .record-detail .preview-record-fields {
  margin: 20px 0;
}
.registry-app .record-detail .preview-record-fields > div {
  display: block;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}
.registry-app .record-detail .preview-record-fields dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.registry-app .record-detail .preview-record-fields dd {
  font-size: 13px;
}
.registry-app .record-detail .preview-record-tabs {
  gap: 16px;
  font-size: 12px;
}
.registry-app .record-detail .preview-details {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.registry-app .record-detail .preview-details summary {
  font-size: 12px;
}
.registry-app .record-detail .preview-details dl {
  margin-bottom: 0;
}
.direct-comparison {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.direct-comparison .record-detail {
  width: 100%;
  border: 0;
  max-height: none;
}
.comparison-main > .record-detail {
  width: 100%;
  border: 0;
  max-height: none;
}
.match-list {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 290px);
  overflow: auto;
  scrollbar-color: #b5bdcc #f7f8fa;
}
.match-list .table-footer {
  margin-top: auto;
}
.match-list .pagination-actions {
  gap: 4px;
}
.comparison-nav .mobile-back {
  display: none;
}
.intersection-summary-controls {
  margin-bottom: 0;
}
.profile-dialog,
.export-dialog {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.preview-actions button {
  border-radius: 6px;
}
.preview-filter-group legend {
  font-size: 13px;
}
.preview-collection-item {
  border-color: var(--line);
}
.preview-login {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.preview-label {
  font-size: 10px;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 208px;
    flex-basis: 208px;
  }
  .registry-app .record-detail {
    flex-basis: 310px;
  }
  .toolbar .search {
    flex: 1;
    min-width: 220px;
  }
  .toolbar {
    row-gap: 10px;
  }
  .sidebar .brand-suffix {
    display: none;
  }
}
@media (max-width: 800px) {
  .sidebar {
    width: 100%;
    flex-basis: auto;
  }
  .sidebar nav button {
    width: auto;
    gap: 6px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .sidebar nav button .nav-count {
    display: none;
  }
  .sidebar .brand-suffix {
    display: block;
  }
  .registry-app .with-detail .record-detail {
    flex: 1;
  }
  .result-actions select {
    max-width: 110px;
  }
  .toolbar .search {
    flex: auto;
    min-width: 0;
  }
  .table-footer .pagination-actions {
    display: flex;
  }
  .topbar-actions {
    gap: 10px;
  }
}
@media (max-width: 620px) {
  .result-actions {
    gap: 8px;
    align-items: flex-end;
    flex-direction: column;
  }
  .result-line > .result-actions {
    max-width: 45%;
  }
  .result-actions select {
    max-width: 130px;
  }
  .toolbar > .popover:last-child {
    margin-left: 0;
  }
  .toolbar-space {
    display: block;
    flex: 1;
  }
  .comparison-nav .mobile-back {
    display: flex;
  }
  .match-list {
    max-height: none;
  }
  .comparison-layout.mobile-detail .comparison-main {
    display: block;
  }
  .comparison-layout .comparison-main {
    display: none;
  }
  .record-detail {
    max-height: none;
  }
  .toolbar .search {
    width: 100%;
    flex: 0 0 100%;
  }
  .registry-app .record-detail {
    padding: 18px;
  }
  .registry-app .record-detail .preview-record-tabs {
    gap: 14px;
  }
  .sidebar nav {
    justify-content: flex-start;
  }
  .table-footer {
    align-items: center;
  }
  .sidebar nav button {
    flex: 1;
    justify-content: center;
  }
}
.pair-condition {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 620px) {
  .pair-condition {
    margin: 0;
    width: 100%;
    font-size: 10px;
  }
}

.record-additional {
  margin-block: 24px;
}
.record-additional h3 {
  margin-block: 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.attribute-origin {
  display: block;
  margin-block-start: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.record-additional dd {
  overflow-wrap: anywhere;
}
