@font-face {
  font-family: "CIMC Lanting";
  src: url("assets/fz-lantinghei-sc.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f4f3;
  --panel: rgba(250, 251, 249, 0.94);
  --panel-solid: #fafbf9;
  --card: #f7f8f6;
  --card-strong: #eef1ef;
  --ink: #171d24;
  --muted: #66717c;
  --faint: #949da5;
  --line: #d3d9da;
  --line-strong: #b9c1c4;
  --blue: #0048da;
  --blue-soft: #dce7ff;
  --cyan: #00cdb2;
  --cyan-soft: rgba(0, 205, 178, 0.12);
  --danger: #e34f5f;
  --shadow: 0 18px 44px rgba(24, 34, 43, 0.1);
  --header-height: 76px;
  --footer-height: 34px;
}

html[data-theme="night"] {
  color-scheme: dark;
  --bg: #07101d;
  --panel: rgba(8, 18, 31, 0.96);
  --panel-solid: #091422;
  --card: #0e1c2c;
  --card-strong: #122337;
  --ink: #f2f7fb;
  --muted: #9caabb;
  --faint: #68788b;
  --line: #26374a;
  --line-strong: #41536a;
  --blue: #3977ff;
  --blue-soft: rgba(57, 119, 255, 0.17);
  --cyan: #22e3c6;
  --cyan-soft: rgba(34, 227, 198, 0.13);
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 1180px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    linear-gradient(rgba(120, 133, 144, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 133, 144, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: 80px 80px;
  color: var(--ink);
  font-family: "CIMC Lanting", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.01em;
}

button,
input {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 184px minmax(260px, 1fr) auto auto;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 132px;
  max-height: 52px;
}

.view-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 28px;
  align-self: center;
}

.view-title strong {
  font-size: 17px;
}

.view-title span {
  color: var(--muted);
  font-size: 11px;
}

.view-switch {
  align-self: center;
  padding-right: 28px;
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 142px;
  padding: 10px 18px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}

.view-tab svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.view-tab span {
  display: grid;
  gap: 2px;
  text-align: left;
}

.view-tab strong {
  font-size: 12px;
}

.view-tab small {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}

.top-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.internal-toggle,
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.internal-toggle.is-active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--ink);
}

.status-dot,
.theme-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.internal-toggle.is-active .status-dot,
.mode-indicator.is-internal .status-dot {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.theme-dot {
  background: #f3bd38;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.language-toggle i {
  color: var(--line-strong);
  font-style: normal;
}

.top-actions time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.workspace {
  display: grid;
  grid-template-columns: 292px minmax(560px, 1fr) 390px;
  height: calc(100vh - var(--header-height) - var(--footer-height));
}

.sidebar,
.detail-panel {
  position: relative;
  z-index: 4;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.sidebar {
  overflow-y: auto;
  padding: 34px 28px 28px;
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-intro h1 {
  margin: 0;
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.sidebar-intro > p:last-child {
  max-width: 220px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 28px 0;
  border-block: 1px solid var(--line);
}

.metrics div {
  display: grid;
  gap: 4px;
  padding: 16px 8px 15px 0;
}

.metrics div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.metrics strong {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.metrics span {
  color: var(--muted);
  font-size: 9px;
}

.search-control > span,
.filter-heading,
.provenance > span {
  color: var(--muted);
  font-size: 10px;
}

.search-control > div {
  position: relative;
  margin-top: 9px;
}

.search-control input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: var(--card);
  font-size: 12px;
}

.search-control input:focus {
  border-color: var(--blue);
}

.search-control svg {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.4;
}

.filter-block {
  margin-top: 24px;
}

.filter-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.filter-heading small {
  color: var(--ink);
}

.filter-heading button {
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 9px;
}

.business-filters {
  display: grid;
  gap: 6px;
}

.business-filter {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.business-filter:hover,
.business-filter.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.business-filter span:first-child,
.business-filter small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.subgroup-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subgroup-filter {
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 9px;
}

.subgroup-filter:hover,
.subgroup-filter.is-active {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  color: var(--ink);
}

.provenance {
  margin-top: 28px;
  padding: 14px 0 0 12px;
  border-left: 2px solid var(--blue);
}

.provenance p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.gallery-stage {
  overflow-y: auto;
  padding: 28px 28px 60px;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 70px;
  margin-bottom: 20px;
}

.gallery-header .eyebrow {
  margin-bottom: 7px;
  color: var(--muted);
}

.gallery-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.mode-indicator {
  display: grid;
  grid-template-columns: 8px auto;
  gap: 2px 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.mode-indicator .status-dot {
  grid-row: 1 / 3;
  align-self: center;
  background: var(--blue);
}

.mode-indicator strong {
  font-size: 10px;
}

.mode-indicator small {
  color: var(--muted);
  font-size: 8px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.product-card {
  position: relative;
  display: grid;
  min-height: 280px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  z-index: 2;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-card.is-selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.product-card.is-featured {
  grid-column: span 2;
}

.product-image {
  position: relative;
  min-height: 165px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 72, 218, 0.06), transparent 55%),
    var(--card-strong);
}

.product-image::after {
  position: absolute;
  inset: 0;
  border-bottom: 1px solid var(--line);
  content: "";
  pointer-events: none;
}

.product-image img {
  width: 100%;
  height: 100%;
  min-height: 165px;
  max-height: 220px;
  object-fit: contain;
  transition: transform 300ms ease;
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.product-index,
.product-access {
  position: absolute;
  top: 10px;
  z-index: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.product-index {
  left: 10px;
  color: var(--muted);
}

.product-access {
  right: 10px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--blue);
}

.product-card-copy {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 15px 16px 16px;
}

.product-card-copy > span {
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-card-copy h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}

.product-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8px;
}

.product-card-footer i {
  width: 26px;
  height: 1px;
  background: var(--cyan);
}

.detail-panel {
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.detail-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.detail-hero {
  position: relative;
  height: 270px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--card-strong);
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.08));
  content: "";
  pointer-events: none;
}

.detail-number {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 2;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.detail-content {
  padding: 24px 22px 56px;
}

.detail-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-kicker span:last-child {
  color: var(--muted);
}

.detail-content h2 {
  margin: 12px 0 5px;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.detail-en-name {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.detail-fields {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-field {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  font-size: 10px;
  line-height: 1.5;
}

.detail-field span {
  color: var(--muted);
}

.detail-field strong {
  font-weight: 500;
}

.detail-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  color: var(--blue);
  font-size: 9px;
  text-decoration: none;
}

.detail-model-link {
  position: relative;
  display: grid;
  gap: 7px;
  margin-top: 24px;
  padding: 16px 42px 16px 16px;
  border: 1px solid var(--blue);
  background: var(--blue-soft);
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.detail-model-link:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.detail-model-link span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.detail-model-link b {
  color: var(--blue);
  font-size: 8px;
  letter-spacing: .12em;
}

.detail-model-link:hover b,
.detail-model-link:hover small {
  color: #fff;
}

.detail-model-link small {
  color: var(--muted);
  font-size: 8px;
}

.detail-model-link i {
  position: absolute;
  top: 50%;
  right: 16px;
  font-size: 13px;
  font-style: normal;
  transform: translateY(-50%);
}

.internal-section {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--cyan);
  background: var(--cyan-soft);
}

.internal-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.internal-section header strong {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.internal-section header span {
  color: var(--muted);
  font-size: 8px;
}

.spec-list {
  display: grid;
  gap: 8px;
}

.spec-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 205, 178, 0.22);
  font-size: 9px;
}

.spec-row span {
  color: var(--muted);
}

.internal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.internal-actions button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-size: 9px;
}

.internal-actions button:first-child {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.internal-disclaimer {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.empty-state {
  padding: 80px 24px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.empty-state p {
  font-size: 11px;
}

.empty-state button {
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--footer-height);
  padding: 0 28px;
  border-top: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.access-gate {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 10, 18, 0.68);
  backdrop-filter: blur(12px);
}

.access-gate[hidden] {
  display: none;
}

.access-panel {
  position: relative;
  width: min(440px, calc(100vw - 48px));
  padding: 38px;
  border-top: 3px solid var(--cyan);
  background: var(--panel-solid);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.access-panel > img {
  width: 140px;
  margin-bottom: 28px;
}

.access-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 500;
}

.access-panel > p:not(.eyebrow) {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.access-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.access-panel input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  outline: none;
  background: var(--card);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  letter-spacing: 0.3em;
}

.access-panel input:focus {
  border-color: var(--blue);
}

.access-submit {
  width: 100%;
  height: 46px;
  margin-top: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
}

.access-panel > small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 8px;
}

.access-error {
  color: var(--danger) !important;
}

.access-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: 168px minmax(190px, 1fr) auto auto;
  }

  .view-title span {
    display: none;
  }

  .workspace {
    grid-template-columns: 270px minmax(520px, 1fr) 350px;
  }

  .top-actions {
    gap: 7px;
    padding-right: 18px;
  }

  .top-actions time {
    display: none;
  }

  .product-card.is-featured {
    grid-column: span 1;
  }
}

@media (max-width: 1180px) {
  html,
  body {
    min-width: 0;
    overflow: auto;
  }

  body {
    overflow-x: hidden;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 150px 1fr auto;
  }

  .view-title,
  .view-switch,
  .top-actions time,
  .internal-toggle span:last-child {
    display: none;
  }

  .workspace {
    display: block;
    height: auto;
  }

  .sidebar {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-panel {
    min-height: 70vh;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .gallery-stage {
    overflow: visible;
  }

  .statusbar {
    display: none;
  }
}
