:root {
  --primary: #0b6f7b;
  --text-strong: #10243b;
  --text-normal: #334155;
  --text-soft: #6a7d90;
  --muted-foreground: #6a7d90;
  --border: rgba(16, 36, 59, .12);
  --surface-muted: #f4f8fb;
  --ring: #0b6f7b;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-soft: 0 2px 12px rgba(16, 36, 59, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--text-normal); background: #eef4f7; font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.app-content { min-width: 0; }

/* Mirrored from the public EasyAI Gateway appTopbar geometry. */
.app-topbar { z-index: 10; position: sticky; top: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 0 26px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.88); box-shadow: 0 1px rgba(16,24,40,.03); backdrop-filter: blur(12px); }
.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-mark { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff; background: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: -.08em; box-shadow: 0 6px 16px rgba(11,111,123,.2); }
.brand-copy { min-width: 0; overflow-wrap: anywhere; }
.brand-copy strong { display: block; color: var(--text-strong); font-size: 14px; font-weight: 650; line-height: 1.15; }
.brand-copy span { display: block; color: var(--text-soft); font-size: 11px; line-height: 1.4; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; max-width: 100%; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.72); }
.top-nav-item { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--text-soft); background: transparent; font-size: 13px; font-weight: 550; text-decoration: none; white-space: nowrap; transition: color .16s, box-shadow .16s, background-color .16s, transform .16s; }
.top-nav-item:hover, .top-nav-item.is-active { color: var(--text-strong); background: #fff; box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.topbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.language-switcher { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: background-color .16s, transform .16s; }
.language-switcher:hover { background: var(--surface-muted); transform: translateY(-1px); }
.topbar-contact { color: var(--text-soft); font-size: 13px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.topbar-contact:hover { color: var(--text-strong); }
.topbar-login { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid rgba(11,111,123,.24); border-radius: 999px; color: #fff; background: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .16s, box-shadow .16s; }
.topbar-login:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(11,111,123,.18); }
.loading-state { display: grid; place-items: center; min-height: 50vh; color: #6a7d90; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.origin-return { display: inline-flex; align-items: center; flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); background: var(--surface); font-size: 13px; text-decoration: none; transition: transform .18s, box-shadow .18s; }
.origin-return:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(8,52,75,.10); }
.model-results { min-width: 0; }
.model-card { width: 100%; }
.model-card:focus-visible, .back-link:focus-visible, .origin-return:focus-visible, .top-nav-item:focus-visible, .topbar-login:focus-visible { outline: 3px solid rgba(11,111,123,.22); outline-offset: 3px; }
.model-card-cover { isolation: isolate; }
.modality-icon { width: 22px; height: 22px; }
.modality-items { display: inline-flex; align-items: center; gap: 7px; }
.modality-flow-card > span, .metric-grid > div > span, .timeline > span, .api-meta > span { display: block; color: var(--muted); font-size: 11px; }
.modality-flow { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.modality-arrow { color: var(--accent); font-size: 20px; }
.metric-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(120px, 1fr)); gap: 14px; }
.metric-grid > div:not(.modality-flow-card) { display: grid; align-content: center; min-height: 76px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.metric-grid > div b { display: block; margin-top: 7px; color: var(--ink); font-size: 18px; }
.timeline { margin-top: 18px; }
.timeline-bars { display: flex; align-items: end; gap: 3px; height: 56px; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.timeline-bars i { display: block; flex: 1; min-width: 2px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--accent), rgba(8,126,139,.2)); }
.pricing-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pricing-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 12px; }
.pricing-table th, .pricing-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.pricing-table th { color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 700; }
.pricing-table tr:last-child td { border-bottom: 0; }
.spec-table { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.spec-table > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.spec-table > div:last-child { border-bottom: 0; }
.spec-table dt { color: var(--muted); font-size: 12px; }
.spec-table dd { margin: 0; color: var(--ink); font-size: 13px; }
.api-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.api-meta code { color: var(--ink); font-size: 12px; }
.code-panel { overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: #d9eff2; background: #0b1f2b; }
.code-panel code { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }

@media (max-width: 1180px) {
  .app-topbar { align-items: flex-start; padding: 14px 20px; }
  .brand-block { flex: 1 1 180px; }
  .top-nav { order: 3; width: 100%; justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modality-flow-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .app-topbar { gap: 12px; padding: 12px 16px; }
  .brand-copy span { display: none; }
  .top-nav { overflow-x: auto; flex-wrap: nowrap; width: calc(100vw - 32px); }
  .top-nav-item { flex: none; padding: 0 11px; font-size: 12px; }
  .topbar-contact { display: none; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .origin-return { align-self: flex-start; }
  .catalog-layout { grid-template-columns: 1fr; gap: 18px; }
  .filter-sidebar { position: static; }
  .models-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero { flex-direction: column; }
  .detail-price { width: 100%; }
  .detail-layout { grid-template-columns: 1fr; gap: 20px; }
  .detail-nav { position: static; display: flex; flex-wrap: wrap; gap: 12px 20px; }
}
@media (max-width: 520px) {
  .models-grid { grid-template-columns: 1fr; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .sync-status { white-space: normal; }
  .metric-grid { grid-template-columns: 1fr; }
  .modality-flow-card { grid-column: auto; }
  .spec-table > div { grid-template-columns: 1fr; gap: 4px; }
  .detail-hero h2 { font-size: 38px; }
}
