:root {
  --layout-max-width: 1880px;
  --layout-padding-inline: clamp(14px, 2.4vw, 36px);
  --bg-panel: rgba(236, 244, 250, 1);
  --bg-soft: rgba(248, 249, 250, 1);
  --bg-card: #dce2ea;
  --line: #c7cedb;
  --line-strong: #b8c1ce;
  --text-main: #2f3a53;
  --text-sub: #5d6a84;
  --accent: #2b83da;
  --accent-dark: #1d6fe4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text-main);
  /* font-family: "YouYuan", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif; */
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #d7dbe2;
  box-shadow: 0 2px 4px rgba(189, 189, 189, 0.5);
  z-index: 9999;
}

.navbar-inner {
  width: min(90%, 1100px);
  margin: 0 auto;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-container {
  position: relative;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
}

.navbar-container-iconandlinks {
  height: 100%;
}

.nav-brand-box {
  display: flex;
  align-items: center;
  height: 2.667em;
  margin-right: 18px;
}

.nav-brand-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.nav-brand-icon {
  width: auto;
  height: 100%;
  display: block;
}

.nav-primary-link,
.nav-dropdown-toggle,
.dropdown-menu-button,
.nav-dropdown-item {
  color: #464d59;
  font-size: 14px;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 8px;
  font: inherit;
  cursor: pointer;
}

.nav-primary-link:hover,
.nav-dropdown-toggle:hover,
.dropdown-menu-button:hover {
  color: #177ddc;
}

.region-language {
  display: flex;
  align-items: center;
  color: #464d59;
  height: 100%;
}

.navbar-option {
  display: flex;
  align-items: center;
  height: 100%;
}

.dropdown-menu {
  position: relative;
  display: inline-block;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 0;
}

.dropdown-menu-button {
  border: 0;
  outline: none;
  margin-left: 10px;
  margin-right: 30px;
  background: transparent;
  color: #464d59;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.dropdown-menu-content {
  position: absolute;
  top: 43px;
  left: 0;
  display: block;
  min-width: 168px;
  padding: 0;
  list-style: none;
  background: #f9f9f9;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: scale(0);
  transform-origin: top left;
  transition: transform 0s ease;
  transition-delay: 0.4s;
  z-index: 40;
}

.dropdown-menu:hover .dropdown-menu-content,
.dropdown-menu:focus-within .dropdown-menu-content,
.dropdown-menu.is-open .dropdown-menu-content {
  transform: scale(1);
  transition-delay: 0s;
}

.dropdown-menu-content-0 {
  right: -20%;
  left: auto;
  min-width: 124px;
  transform-origin: top right;
}

.nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.navbar-option-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 20px;
  color: #333333;
  text-align: left;
  display: block;
  white-space: nowrap;
  font: inherit;
  cursor: pointer;
}

.navbar-option-dropdown-item:hover,
.navbar-option-dropdown-item:focus-visible {
  background: #00164b;
  color: #ffffff;
  outline: none;
}

.nav-selector-group {
  display: flex;
  flex-direction: column;
}

.nav-selector-group-label {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.nav-selector-group-item {
  padding-left: 32px;
}

.main-container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 60px var(--layout-padding-inline) 36px;
}

.hero {
  padding: 0;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 75px;
  font-weight: 700;
}

.section-title-row h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
}

.layout-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.top-layout {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 250px minmax(620px, 1fr) 300px;
  grid-template-areas: "left middle right";
}

.left-col {
  grid-area: left;
  width: auto;
  min-width: 0;
}

.middle-col {
  grid-area: middle;
  width: auto;
  min-width: 0;
}

.center-col {
  grid-area: center;
  width: auto;
  min-width: 0;
}

.right-col {
  grid-area: right;
  width: auto;
  min-width: 0;
}

.col-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 10px;
}

.middle-col .col-title,
.right-col .col-title {
  margin-bottom: 16px;
}

.panel {
  border-radius: 6px;
  padding: 12px;
}

.params-panel,
.detail-panel {
  min-height: 760px;
  background: var(--bg-soft);
}

.results-panel,
.viz-panel {
  min-height: 760px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
}

.top-layout .params-panel,
.top-layout .viz-panel,
.top-layout .detail-panel {
  height: 760px;
}

.top-layout .params-panel {
  overflow-y: auto;
  overflow-x: hidden;
}

.top-layout .detail-panel {
  overflow-y: auto;
  overflow-x: hidden;
}

.recommend-title {
  font-size: 13px;
  font-weight: 700;
  color: #2f3a53;
  margin-bottom: 14px;
}

.recommend-shell {
  max-height: 170px;
  margin-bottom: 10px;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-head,
.overview-list,
.spec-table {
  flex-shrink: 0;
}

.results-panel {
  min-height: 430px;
}

.viz-panel {
  gap: 10px;
}

.viz-workbench {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.match-panel {
  border: 1px solid #b7d4c4;
  background: #f0f6f2;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.match-list {
  border: 1px solid #cdd9e5;
  border-radius: 6px;
  background: #e8eef4;
  padding: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 6px;
}

.match-item {
  border: 1px solid #bcc8d8;
  border-radius: 6px;
  background: #b6bec8;
  color: #ffffff;
  padding: 8px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.match-item:hover {
  border-color: #7f9cbe;
}

.match-item.is-selected {
  background: #2b83da;
  border-color: #1e6fc0;
}

.match-item-model {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-item-meta {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.96;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.match-item-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-item-acc {
  font-weight: 700;
}

.viz-main {
  border: 1px solid #c5cfdd;
  border-radius: 6px;
  background: #d8e2ed;
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}



.viz-mode-row {
  display: none;
}

.viz-mode-label {
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}

.viz-mode-switch {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  overflow: hidden;
  background: #f8fafc;
}

.viz-mode-btn {
  border: 0;
  background: transparent;
  color: #475569;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.viz-mode-btn:hover {
  background: #eef2ff;
}

.viz-mode-btn.is-active {
  background: #1d6fe4;
  color: #ffffff;
}

.preset-block,
.simple-guide {
  background: #f3f7fd;
  border: 1px solid #d3dceb;
  border-radius: 6px;
  padding: 10px;
}

.preset-block {
  display: none;
}

.preset-title,
.simple-guide-title,
.detail-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #53617d;
}

.simple-guide {
  margin-top: 14px;
}

.simple-guide-title {
  font-size: 12px;
}

.simple-guide-text {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.preset-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.preset-btn,
.primary-btn {
  border: 1px solid #bfc8d8;
  border-radius: 4px;
  font-family: inherit;
  cursor: pointer;
}

.preset-btn {
  flex: 1;
  padding: 6px 4px;
  background: #eef2f8;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.preset-btn:hover {
  border-color: #7c5cbf;
  color: var(--accent-dark);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.param-auto-hint {
  padding: 8px 10px;
  border: 1px solid #d3dceb;
  border-left: 3px solid #2b83da;
  border-radius: 4px;
  background: #eef5ff;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}

.field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3f4a63;
  font-size: 13px;
  flex: 1;
  min-width: 120px;
}

.param-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
}

.param-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  border-radius: 50%;
  background: #b0bac8;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

.param-tip-icon:hover {
  background: #7c5cbf;
}

/* 内容容器，始终隐藏，供 JS 读取文本 */
.param-tip-popup {
  display: none;
}

/* 全局 fixed tooltip，由 JS 控制 */
#param-tip-global {
  display: none;
  position: fixed;
  background: #2d3750;
  color: #f0f2f7;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  padding: 9px 12px;
  border-radius: 6px;
  width: 260px;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  white-space: normal;
  text-align: left;
}

#param-tip-global::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 100%;
  border: 5px solid transparent;
  border-right-color: #2d3750;
}

.field input[type="number"],
.field input[type="text"] {
  flex: 0 0 80px;
  text-align: right;
}

.drag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 6px;
}

.circle-label {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 22px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
}

.bg-red { background: #ef4444; }
.bg-green { background: #34b27d; }
.bg-blue { background: #1d6fe4; }
.bg-orange { background: #e07020; }

input[type="range"] {
  display: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7c5cbf;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: #7c5cbf;
  cursor: pointer;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #bfc8d8;
  border-radius: 4px;
  background: #f7f8fb;
  color: var(--text-main);
  font: inherit;
}

input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #7c5cbf;
}

.primary-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.viz-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #3f4a63;
}

.legend-line {
  width: 16px;
  height: 3px;
  display: inline-block;
  border-radius: 3px;
  background: #64748b;
}

.legend-line.selected {
  background: #0f172a;
  box-shadow: 0 0 0 1px #0f172a;
}

.viz-empty {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.viz-shell {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fb;
  overflow: hidden;
  position: relative;
}

#range-viz {
  width: 100%;
  height: 100%;
  display: block;
}

.viz-tooltip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
  white-space: pre-line;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.viz-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.results-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

/* Hide redundant summary sections per latest UX requirement */
.results-top,
#detail-overview {
  display: none;
}

.res-group {
  min-width: 0;
  padding: 5px 6px;
  border-radius: 4px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.res-label {
  color: #55627b;
  font-size: 11px;
  white-space: nowrap;
}

.res-group strong {
  margin-left: auto;
  color: #22304a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.result-summary {
  padding: 2px 2px 8px;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.table-shell,
.matrix-shell {
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.top-layout .params-panel,
.top-layout .detail-panel,
.match-list,
.table-shell {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.top-layout .params-panel::-webkit-scrollbar,
.top-layout .detail-panel::-webkit-scrollbar,
.match-list::-webkit-scrollbar,
.table-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.table-shell {
  flex: 1;
  min-height: 0;
}

.data-table,
.matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.matrix-scroll-hint {
  margin-top: 6px;
  color: #5d6a84;
  font-size: 12px;
  line-height: 1.4;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.matrix-table th,
.matrix-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  min-width: 185px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  min-width: 108px;
}

.data-table thead th,
.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3fa;
  color: #2f3a53;
}

.data-table tbody tr:hover,
.matrix-table tbody tr:hover {
  background: #f8fbff;
}

.data-table tbody tr.is-selected {
  background: #edf5ff;
}

.empty-row td {
  text-align: center;
  color: #6b7280;
  padding: 24px 12px;
}

.detail-head {
  display: block;
  margin-bottom: 12px;
}

.detail-kicker {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1f36;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dce2ea;
  color: #22304a;
  font-size: 12px;
  font-weight: 700;
}

.status-chip-small {
  min-width: auto;
  padding: 3px 8px;
  font-size: 11px;
}

.overview-list {
  margin: 14px 0 18px;
  padding-left: 18px;
}

.overview-list li {
  margin: 6px 0;
  line-height: 1.45;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.spec-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line-strong);
  vertical-align: top;
}

.spec-table td:first-child {
  width: 42%;
  color: #3f4a63;
  font-weight: 700;
}

.spec-table td:last-child {
  font-weight: 400;
  text-align: right;
  color: #1a1f36;
}

.section-title-row {
  margin: 26px 0 10px;
}

.spec-matrix-panel {
  padding: 14px;
  background: var(--bg-panel);
}

/* Class-based sticky columns for matrix table rows with merged category cells. */
.matrix-table .matrix-col-category,
.matrix-table .matrix-category-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 155px;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.matrix-table thead .matrix-col-category {
  z-index: 3;
  background: #eef3fa;
}

.matrix-table .matrix-col-spec,
.matrix-table .matrix-param-cell {
  position: sticky;
  left: 155px;
  z-index: 1;
  min-width: 170px;
  background: #fcfdff;
  border: 1px solid var(--line);
}

.matrix-table thead .matrix-col-spec {
  z-index: 3;
  background: #eef3fa;
}

.matrix-table .matrix-col-model,
.matrix-table .matrix-value-cell {
  min-width: 160px;
}

.matrix-table .matrix-category-cell {
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
}

@media (max-width: 1600px) {
  .top-layout {
    grid-template-columns: 230px minmax(520px, 1fr) 280px;
  }

  .viz-workbench {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 1280px) {
  .top-layout {
    display: flex;
    flex-direction: column;
  }

  .left-col,
  .middle-col,
  .right-col,
  .center-col {
    width: 100%;
  }

  .stack-top,
  .stack-bottom {
    flex: none;
  }

  .params-panel,
  .viz-panel,
  .results-panel,
  .detail-panel {
    height: auto;
    min-height: 0;
  }

  .viz-shell {
    min-height: 320px;
  }

  .viz-workbench {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .navbar-inner {
    width: calc(100% - 24px);
  }

  .nav-left {
    gap: 0;
  }

  .nav-brand-box {
    margin-right: 10px;
  }

  .dropdown-menu-button {
    margin-right: 0;
    margin-left: 0;
    padding-inline: 6px;
  }

  .nav-primary-link {
    padding-inline: 6px;
  }

  .hero h1,
  .section-title-row h2 {
    font-size: 26px;
  }

  .hero h1 {
    line-height: 64px;
  }

  .results-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .res-group {
    min-width: 0;
  }

  .viz-mode-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .drag-row {
    flex-direction: column;
    align-items: stretch;
  }

  input[type="number"] {
    width: 100%;
  }

  .matrix-table .matrix-col-category,
  .matrix-table .matrix-category-cell,
  .matrix-table .matrix-col-spec,
  .matrix-table .matrix-param-cell {
    position: static;
  }
}
