:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --line: #e6e8ec;
  --line-strong: #d9dde4;
  --text: #171a21;
  --muted: #69707d;
  --subtle: #8a919e;
  --brand: #635bff;
  --brand-deep: #4f46e5;
  --brand-soft: #f0efff;
  --cyan: #08a7a7;
  --success: #138a5b;
  --warning: #9a6700;
  --danger: #c93636;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(18, 24, 40, .055);
  --shadow-hover: 0 18px 42px rgba(18, 24, 40, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(99, 91, 255, .2);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 221, 228, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.header-inner {
  width: min(1320px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  min-width: max-content;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 850;
  letter-spacing: -.06em;
  background: linear-gradient(145deg, #756dff 0%, #5148ed 58%, #08a7a7 140%);
  box-shadow: 0 8px 18px rgba(99, 91, 255, .22);
}
.brand-name { font-weight: 760; letter-spacing: -.02em; }
.brand-name small {
  display: block;
  margin-top: 1px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-link, .primary-button, .secondary-button, .text-button, .icon-button {
  border-radius: 11px;
  cursor: pointer;
  font-weight: 680;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 13px;
}
.header-link:hover, .secondary-button:hover { border-color: #c9c5ff; background: #fbfaff; }
.header-link.is-active, .header-link[aria-current="page"] {
  color: var(--brand-deep);
  border-color: #c9c5ff;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(99, 91, 255, .04);
}
.account-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }

.page {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 64px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  margin-bottom: 26px;
}
.eyebrow, .section-kicker {
  margin: 0 0 8px;
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 830px; margin-bottom: 14px; font-size: clamp(32px, 4vw, 54px); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.02em; }
h3 { margin-bottom: 10px; font-size: 15px; }
.hero-copy { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-status {
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-status span:not(.status-dot) { display: block; color: var(--subtle); font-size: 11px; }
.hero-status strong { display: block; margin-top: 2px; font-size: 13px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px rgba(99, 91, 255, .09); }
.status-dot.success { background: var(--success); box-shadow: 0 0 0 5px rgba(19, 138, 91, .09); }
.status-dot.error { background: var(--danger); box-shadow: 0 0 0 5px rgba(201, 54, 54, .08); }

.filters, .service-notes {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.filter-heading, .catalog-toolbar, .code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
input, select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}
input:hover, select:hover { border-color: #c9c5ff; }
input::placeholder { color: var(--subtle); }
.text-button {
  padding: 6px 8px;
  color: var(--brand-deep);
  border: 0;
  background: transparent;
}
.text-button:hover { background: var(--brand-soft); }

.catalog-section { margin-top: 30px; }
.catalog-toolbar { margin-bottom: 16px; }
.result-count { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.model-grid, .skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.model-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.model-card:hover { transform: translateY(-3px); border-color: #d8d5ff; box-shadow: var(--shadow-hover); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.provider-name { margin-bottom: 3px; color: var(--subtle); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.model-name { margin-bottom: 0; font-size: 17px; line-height: 1.28; overflow-wrap: anywhere; }
.model-id { margin-bottom: 0; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.availability-tag { flex: 0 0 auto; padding: 4px 8px; color: var(--warning); border: 1px solid #eadfbd; border-radius: 999px; background: #fffaf0; font-size: 10px; font-weight: 750; }
.availability-tag.saleable { color: var(--success); border-color: #cde8dc; background: #f1fbf6; }
.availability-tag.offline { color: var(--danger); border-color: #f0d0d0; background: #fff7f7; }
.model-description { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: 8px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.4; }
.fact { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-soft); }
.fact span { display: block; color: var(--subtle); font-size: 10px; }
.fact strong { display: block; margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; color: #4f5270; border-radius: 999px; background: #f2f3f8; font-size: 11px; font-weight: 650; }
.tag.muted { color: var(--subtle); }
.price-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.price-unit { margin-bottom: 6px; color: var(--subtle); font-size: 11px; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.price-item span { display: block; color: var(--subtle); font-size: 10px; }
.price-item strong { display: block; margin-top: 2px; font-size: 16px; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.02em; }
.price-sub { margin: 8px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 12px; }
.primary-button, .secondary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 13px;
}
.primary-button { color: #fff; border: 1px solid var(--brand); background: var(--brand); box-shadow: 0 8px 18px rgba(99, 91, 255, .16); }
.primary-button:hover { background: var(--brand-deep); border-color: var(--brand-deep); transform: translateY(-1px); }
.primary-button[aria-disabled="true"] { color: var(--subtle); border-color: var(--line); background: var(--surface-soft); box-shadow: none; cursor: not-allowed; transform: none; }
.secondary-button { color: var(--text); border: 1px solid var(--line-strong); background: #fff; }

.skeleton-card {
  height: 268px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #fff 15%, #f4f5f7 35%, #fff 55%);
  background-size: 240% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.error-banner {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  color: #7d2f2f;
  border: 1px solid #f0d0d0;
  border-radius: var(--radius-md);
  background: #fff8f8;
}
.error-banner p { margin: 4px 0 0; font-size: 13px; }
.empty-state {
  padding: 54px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.empty-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--brand-deep); border-radius: 15px; background: var(--brand-soft); font-weight: 800; }
.empty-state p { color: var(--muted); }
.empty-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.service-notes { margin-top: 30px; display: grid; grid-template-columns: .7fr 1.3fr; gap: 30px; }
.service-notes ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }

.detail-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: var(--radius-lg); background: transparent; box-shadow: 0 28px 80px rgba(20, 24, 38, .26); }
.detail-dialog::backdrop { background: rgba(25, 29, 42, .45); backdrop-filter: blur(3px); }
.dialog-shell { max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
.dialog-head, .dialog-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; }
.dialog-head { border-bottom: 1px solid var(--line); }
.dialog-actions { align-items: center; border-top: 1px solid var(--line); }
.dialog-body { padding: 22px; overflow-y: auto; }
.dialog-body section + section { margin-top: 24px; }
.icon-button { width: 38px; height: 38px; flex: 0 0 auto; color: var(--muted); border: 1px solid var(--line); background: var(--surface-soft); font-size: 24px; line-height: 1; }
.model-code, .parameter-list, .price-meta, .detail-description, .service-status { color: var(--muted); font-size: 13px; line-height: 1.65; }
.model-code { margin: 5px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 24px; }
.price-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.price-table .price-item { padding: 11px; border-radius: var(--radius-sm); background: var(--surface-soft); }
.price-meta { margin: 10px 0 0; }
.parameter-list { margin: 10px 0 0; overflow-wrap: anywhere; }
.code-heading { margin-bottom: 9px; }
.code-heading h3 { margin-bottom: 0; }
.code-sample { margin: 0; padding: 15px; overflow-x: auto; color: #e7e8ef; border-radius: var(--radius-md); background: #20222b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.noscript { margin: 20px auto; padding: 12px; width: min(800px, calc(100% - 40px)); color: var(--danger); text-align: center; }

[hidden] { display: none !important; }
@media (max-width: 1080px) {
  .header-actions .header-link:last-child { display: none; }
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .header-inner { width: min(100% - 24px, 1320px); min-height: 60px; gap: 10px; }
  .brand-name small { display: none; }
  .brand-name { display: none; }
  .header-actions { gap: 4px; }
  .header-link { min-height: 44px; padding: 0 8px; }
  .header-actions .header-link:first-child { display: none; }
  .page { width: min(100% - 24px, 1320px); padding: 28px 0 42px; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-status { width: 100%; }
  h1 { font-size: 31px; }
  .filters { padding: 17px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .model-grid, .skeleton-grid { grid-template-columns: 1fr; }
  .service-notes { grid-template-columns: 1fr; gap: 16px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
  .dialog-actions .primary-button { width: 100%; }
}
@media (max-width: 440px) {
  .header-actions .header-link:nth-child(3) { display: none; }
  .filter-grid { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .card-actions, .price-grid, .price-table { grid-template-columns: 1fr; }
  .error-banner { align-items: stretch; flex-direction: column; }
  .empty-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* unified-site-shell-external v6.248.0 */
:root { --unified-shell-width: 1320px; --unified-shell-header-height: 82px; }
.unified-site-header,
.unified-site-header * { box-sizing: border-box; }
.unified-site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  border-bottom: 1px solid rgba(17, 24, 39, .11);
  color: #111827;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.unified-nav-shell {
  width: min(var(--unified-shell-width), calc(100% - 48px));
  min-height: var(--unified-shell-header-height);
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.unified-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
}
.unified-brand img {
  display: block;
  width: 40px;
  height: 40px;
  max-width: none;
  object-fit: cover;
  border: 1px solid rgba(17, 24, 39, .11);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.unified-brand span {
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 19.2px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
}
.unified-primary-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.unified-primary-nav::-webkit-scrollbar { display: none; }
.unified-primary-nav > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #506176;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15.68px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.unified-primary-nav > a:hover,
.unified-primary-nav > a.is-active {
  color: #0b579f;
  border-color: rgba(17, 24, 39, .11);
  background: #f5f7fa;
}
html.is-embedded .unified-site-header,
html.is-embedded body > .site-header:not(.unified-site-header) { display: none !important; }

/* Retain page-specific account/status controls without retaining a second primary nav. */
body > .site-header:not(.unified-site-header) { position: relative !important; top: auto !important; }
body > .site-header:not(.unified-site-header) .brand-lockup { display: none !important; }
body > .site-header:not(.unified-site-header) .header-actions > a.header-link:is(
  [href="/all/"], [href="/token/"], [href="/showcase/"], [href="/hf/"],
  [href="/hardware/#hw"], [href="/tongtianta/"], [href="/qlsoulmate/"], [href="/console/"]
) { display: none !important; }
body > .site-header:not(.unified-site-header) .header-inner {
  width: min(var(--unified-shell-width), calc(100% - 48px)) !important;
  min-height: 54px !important;
  justify-content: flex-end !important;
}
body > header.top { position: relative !important; top: auto !important; width: min(var(--unified-shell-width), calc(100% - 48px)) !important; margin-inline: auto !important; }
body > header.top > .brand,
body > header.top .site-nav { display: none !important; }
body > header.top .top-actions { margin-left: auto !important; }
body > .shell > .topbar { position: relative !important; top: auto !important; justify-content: flex-end !important; }
body > .shell > .topbar > .brand,
body > .shell > .topbar .market-nav-link,
body > .shell > .topbar #ordersBtn { display: none !important; }
body > .wrap > .topbar { position: relative !important; top: auto !important; justify-content: flex-end !important; }
body > .wrap > .topbar > .brand,
body > .wrap > .topbar .site-nav { display: none !important; }
.sidebar > .brand { display: none !important; }

/* Legacy page shells hand their account/status controls to the unified header. */
.unified-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 8px;
}
.unified-actions:empty { display: none; }
.unified-actions > * { flex: 0 0 auto; margin: 0; }
:where(.unified-actions) :where(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(17, 24, 39, .11);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.unified-actions a,
.unified-actions button { min-height: 40px; }
.unified-actions .market-nav-link,
.unified-actions .date,
.unified-actions .site-nav,
.unified-actions #ordersBtn,
.unified-actions #header-orders { display: none !important; }
[data-unified-legacy-collapsed] { display: none !important; }
.unified-version {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
body > .wrap > .topbar { display: none !important; }
body > header.top > .top-actions > .date { display: none !important; }
/* /token/ serves script-src 'self', which blocks the inline relocation script, so its
   legacy shell is collapsed by this stylesheet and its account link is placed statically. */
body > .site-header:not(.unified-site-header) { display: none !important; }

/* One outer-width contract; component, card and modal widths remain untouched. */
.page,
body > .shell,
body > .wrap {
  width: min(var(--unified-shell-width), calc(100% - 48px)) !important;
  max-width: var(--unified-shell-width) !important;
  margin-inline: auto !important;
}
body > .wrap { padding-left: 0 !important; padding-right: 0 !important; }
body > main,
body > .tabs,
body > .boot-status {
  width: min(var(--unified-shell-width), calc(100% - 48px)) !important;
  max-width: var(--unified-shell-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.content {
  width: min(var(--unified-shell-width), calc(100% - 48px)) !important;
  max-width: var(--unified-shell-width) !important;
  margin-inline: auto !important;
}
.sidebar { top: var(--unified-shell-header-height) !important; }
.main-shell > .topbar { top: var(--unified-shell-header-height) !important; }

@media (max-width: 860px) {
  :root { --unified-shell-header-height: 112px; }
  .unified-nav-shell {
    width: min(var(--unified-shell-width), calc(100% - 24px));
    min-height: var(--unified-shell-header-height);
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .unified-primary-nav {
    order: 2;
    flex: 0 0 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .unified-primary-nav::-webkit-scrollbar { display: none; }
  body > .site-header:not(.unified-site-header) .header-inner,
  .page,
  body > .shell,
  body > .wrap,
  body > header.top,
  body > main,
  body > .tabs,
  body > .boot-status,
  .content { width: min(var(--unified-shell-width), calc(100% - 24px)) !important; }
}
@media (max-width: 860px) {
  .unified-site-header, .unified-site-header * { box-sizing: border-box; }
  .unified-nav-shell { min-width: 0; gap: 6px 8px; }
  .unified-brand { gap: 0; }
  .unified-brand img { width: 32px; height: 32px; }
  .unified-brand span { display: none; }
  .unified-version { display: none; }
  .unified-actions { order: 1; margin-left: auto; min-width: 0; max-width: calc(100% - 40px); gap: 4px; padding-left: 0; }
  .unified-actions a, .unified-actions button { padding-inline: 8px; font-size: 12px; }
}
