/* Yingbei UI refinement. Additive, independently releasable; no billing changes. */
:root {
  --ui-primary: #6239e8;
  --ui-ink: #202538;
  --ui-muted: #60697c;
  --ui-border: #e5e6ef;
  --ui-header-height: 68px;
  --ui-content-max: 1200px;
  --ui-gutter: clamp(20px, 3.6vw, 48px);
  --ui-radius: 12px;
  --ui-motion: 180ms;
  --ui-shadow: 0 8px 26px rgba(33, 38, 65, .055);
}
html:has(.price-header), html:has(.docs-header), html:has(.topnav[data-topnav="landing"]) { scroll-padding-top: calc(var(--ui-header-height) + 16px); }
html:not([data-portal-mode="admin"]) .login { padding: 0; }
.login .topnav[data-topnav="landing"], .login .topnav[data-topnav="landing"].scrolled { background: rgba(255, 255, 255, .96) !important; }

/* Same brand, navigation anchor and primary action on every public page. */
:is(.topnav[data-topnav="landing"], .price-header, .docs-header) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  height: var(--ui-header-height);
  min-height: var(--ui-header-height);
  padding: 0 max(var(--ui-gutter), calc((100vw - var(--ui-content-max)) / 2));
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
:is(.topnav[data-topnav="landing"] .topnav-brand, .price-brand, .docs-brand) {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  white-space: nowrap;
}
:is(.topnav[data-topnav="landing"] .topnav-brand, .price-brand, .docs-brand) img { width: 32px; height: 32px; }
:is(.topnav[data-topnav="landing"] .topnav-brand, .price-brand, .docs-brand) strong { font-size: 20px; letter-spacing: 0; }
.docs-brand > span { display: none; }
:is(.topnav[data-topnav="landing"] .topnav-links, .price-header nav, .docs-header > nav) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
}
:is(.topnav[data-topnav="landing"] .topnav-link, .price-header nav a, .docs-header > nav a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  color: #50576b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background var(--ui-motion), color var(--ui-motion);
}
:is(.topnav[data-topnav="landing"] .topnav-link, .price-header nav a, .docs-header > nav a):is(:hover, .active) {
  color: var(--ui-primary);
  background: #f1edff;
}
.topnav[data-topnav="landing"] .topnav-actions { justify-self: end; margin: 0; }
:is(.topnav[data-topnav="landing"] .topnav-btn, .price-login, .docs-header .console-link) {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 20px;
  color: #fff;
  background: var(--ui-primary);
  border: 1px solid var(--ui-primary);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 3px 10px rgba(98, 57, 232, .12);
}
:is(.topnav[data-topnav="landing"], .price-header, .docs-header) :is(a, button):focus-visible,
.login .landing-card:focus-visible,
.price-center :is(input, button):focus-visible {
  outline: 3px solid #8b6eed;
  outline-offset: 3px;
}

/* Keep the geometric identity but give the message priority over decoration. */
.login .landing-hero {
  min-height: 0;
  background: linear-gradient(115deg, #f8f5ff 0%, #f2f3ff 55%, #edf5ff 100%) !important;
  animation: none;
}
.login .landing-hero::before { top: 54px; width: 42vw; height: 350px; background: rgba(141, 111, 224, .09); animation: none; }
.login .landing-hero::after { width: 38vw; height: 260px; background: rgba(112, 173, 241, .1); animation: none; }
.login .landing-hero-inner {
  width: min(var(--ui-content-max), calc(100% - var(--ui-gutter) * 2));
  max-width: none;
  padding: 68px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
  column-gap: clamp(28px, 4vw, 60px);
  align-items: center;
  text-align: left;
}
.login .landing-hero .eyebrow {
  display: block;
  grid-column: 1;
  width: fit-content;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: #6c54a8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}
.login .landing-hero .hero-title {
  margin: 0 0 20px;
  max-width: none;
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.24;
  font-weight: 750;
  letter-spacing: -.025em;
  color: var(--ui-ink);
}
.login .landing-hero .hero-title > span { display: block; white-space: nowrap; }
.login .landing-hero .landing-sub { max-width: 540px; margin: 0; color: var(--ui-muted); font-size: 16px; line-height: 1.85; }
.login .landing-hero .landing-cta { margin: 26px 0 0; }
.login .landing-hero .landing-cta button#heroRegisterBtn { min-height: 46px; padding: 11px 24px; border-radius: 9px; font-size: 15px; box-shadow: 0 5px 16px rgba(98, 57, 232, .16); }
.login .hero-live { grid-row: 1 / span 4; margin: 0; padding: 18px; animation: none; background: rgba(255, 255, 255, .88); border: 1px solid #e5e1f2; box-shadow: 0 16px 40px rgba(62, 55, 105, .09); }
.login .hero-live-flow { min-height: 190px; padding: 14px; }
.login .hero-live-models .is-active { animation: none; box-shadow: 0 3px 10px rgba(75, 51, 159, .07); }
.login .landing-hero .landing-vendors { position: relative; inset: auto; width: min(var(--ui-content-max), calc(100% - var(--ui-gutter) * 2)); padding: 18px 0; border-top: 1px solid rgba(77, 69, 103, .09); border-bottom: 0; }
.login .landing-hero .vendors-track { animation-duration: 60s; }

/* Compact entry cards, not enlarged model cards. */
.login :is(.landing-cards, .landing-adv, .landing-scenes) { padding: 64px var(--ui-gutter); }
.login .landing-section-heading { margin-bottom: 30px; }
.login .landing-section-heading h2,
.login .landing-cards .landing-section-heading h2 { margin-bottom: 14px; font-size: clamp(27px, 2.9vw, 38px); line-height: 1.35; letter-spacing: -.02em; }
.login .landing-section-heading p { max-width: 760px; margin: 0 auto; color: var(--ui-muted); font-size: 15px; line-height: 1.8; }
.login .landing-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; max-width: var(--ui-content-max); gap: 20px; }
.login .landing-card-grid .landing-card[data-target-view] {
  grid-column: auto;
  min-height: 240px;
  padding: 30px 32px;
  border-radius: 18px;
  box-shadow: var(--ui-shadow);
  transition: transform var(--ui-motion), border-color var(--ui-motion), box-shadow var(--ui-motion);
}
.login .landing-card-grid .landing-card[data-target-view] h3 { margin: 0 0 14px; font-size: 23px; line-height: 1.4; transform: none; }
.login .landing-card-grid .landing-card[data-target-view] p { max-width: 70%; margin: 0; font-size: 15px; line-height: 1.8; transform: none; }
.login .landing-card-grid .landing-card::after { width: 40%; border-radius: 0 17px 17px 0; opacity: .55; }
.login .landing-card-grid .landing-card h3::before { animation: none; }
.login .landing-card-grid .landing-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(39, 39, 62, .1); }
.login .landing-card-grid .landing-card:hover::after { transform: none; opacity: .68; }
.login .landing-adv-grid { max-width: var(--ui-content-max); }

/* Put the first real prices above the fold, not a second marketing hero. */
.price-hero {
  min-height: 0;
  padding: 36px max(var(--ui-gutter), calc((100vw - var(--ui-content-max)) / 2));
  gap: 36px;
  align-items: center;
  background: linear-gradient(115deg, #f8f5ff, #f2f5ff);
}
.price-hero::before { opacity: .55; }
.price-hero h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.25; letter-spacing: -.02em; }
.price-eyebrow { margin-bottom: 10px; font-size: 11px; letter-spacing: .06em; }
.price-hero-copy > p:last-child { max-width: 650px; margin-top: 14px; font-size: 15px; line-height: 1.75; color: var(--ui-muted); }
.price-summary { min-width: 300px; border: 1px solid #e4e3ef; border-radius: var(--ui-radius); box-shadow: none; }
.price-summary div { min-height: 80px; padding: 16px; }
.price-summary strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.price-summary span { color: var(--ui-muted); }
.price-center { width: min(var(--ui-content-max), calc(100% - var(--ui-gutter) * 2)); padding: 26px 0 56px; }
.price-toolbar { gap: 20px; }
.price-search input { height: 44px; border-radius: 9px; }
.price-search > span { top: 13px; }
.price-search button { top: 5px; }
.price-signals { gap: 14px; color: var(--ui-muted); }
.price-center .filter-block { margin-top: 16px; gap: 10px; }
.price-center :is(.segmented button, .vendor-filters button) { min-height: 38px; padding-inline: 13px; border-radius: 8px; font-size: 13px; }
.price-center .result-head { margin-top: 28px; gap: 14px; }
.result-head h2 { font-size: 23px; }
.result-head p { font-size: 13px; line-height: 1.6; }
.price-table-wrap { margin-top: 16px; max-height: min(68vh, 720px); overflow: auto; overscroll-behavior: contain; border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
.price-table th { position: sticky; top: 0; z-index: 2; height: 46px; background: #f5f5fa; color: #545d71; }
.price-table td { padding: 16px 18px; }
.price-table :is(.price-cell, th:nth-child(4), th:nth-child(5)) { text-align: right; font-variant-numeric: tabular-nums; }
.price-table .price-cell { white-space: nowrap; }
.price-table .model-cell code { color: #6b7385; }
.price-table .feature-list span { color: #62567b; background: #f1eef8; font-size: 11px; }
.price-notes { padding: 22px; border-radius: var(--ui-radius); }
.docs-sidebar { top: var(--ui-header-height); height: calc(100vh - var(--ui-header-height)); }

/* Static information should not look like a button. */
#customerApp .metrics article:hover,
#customerApp .customer-metrics article:hover,
#customerApp .profile-grid article:hover { transform: none; box-shadow: var(--ui-shadow); }

@media (max-width: 1000px) {
  .price-summary { min-width: 270px; }
  .price-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .price-search { width: 100%; }
  .price-signals { justify-content: flex-start; flex-wrap: wrap; }
  .docs-header .console-link { white-space: nowrap; }
}
@media (max-width: 820px) {
  :root { --ui-header-height: 112px; }
  :is(.topnav[data-topnav="landing"], .price-header, .docs-header) { grid-template-columns: 1fr auto; grid-template-rows: 64px 48px; gap: 0 12px; padding-inline: 20px; }
  :is(.topnav[data-topnav="landing"] .topnav-links, .price-header nav, .docs-header > nav) { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  :is(.topnav[data-topnav="landing"] .topnav-actions, .price-login, .docs-header .console-link) { grid-column: 2; grid-row: 1; }
  .docs-header.docs-header { grid-template-columns: 1fr auto auto; }
  .sidebar-mask { top: var(--ui-header-height); }
  .docs-header .docs-menu { display: block; grid-column: 3; grid-row: 1; }
  .login .landing-hero-inner { display: block; width: calc(100% - 40px); padding: 42px 0 30px; text-align: center; }
  .login .landing-hero .eyebrow { margin-inline: auto; }
  .login .landing-hero .hero-title { font-size: clamp(30px, 5.3vw, 44px); }
  .login .landing-hero .landing-sub { margin-inline: auto; font-size: 15px; }
  .login .hero-live { width: min(480px, 100%); margin: 32px auto 0; text-align: left; }
  .login .landing-hero .landing-cta { display: flex; justify-content: center; }
  .price-hero { grid-template-columns: 1fr; gap: 22px; padding-block: 28px; }
  .price-summary { width: min(520px, 100%); min-width: 0; }
}
@media (max-width: 640px) {
  :is(.topnav[data-topnav="landing"] .topnav-link, .price-header nav a, .docs-header > nav a) { padding: 8px 12px; min-height: 40px; white-space: nowrap; }
  .login :is(.landing-cards, .landing-adv, .landing-scenes) { padding-block: 42px; }
  .login .landing-card-grid { grid-template-columns: 1fr; gap: 14px; }
  .login .landing-card-grid .landing-card[data-target-view] { grid-column: auto; min-height: 206px; padding: 25px; border-radius: 16px; }
  .login .landing-card-grid .landing-card[data-target-view] h3 { font-size: 21px; }
  .login .landing-card-grid .landing-card[data-target-view] p { max-width: 76%; font-size: 14px; }
  .login .landing-section-heading h2, .login .landing-cards .landing-section-heading h2 { font-size: 27px; }
  .login .hero-live-flow { grid-template-columns: minmax(0, .9fr) 18px minmax(0, 1.1fr); gap: 0; padding: 9px; min-height: 170px; }
  .login .hero-live-route { width: auto; height: 2px; margin: 0; }
  .login .hero-live-route i { left: -7px; top: -2px; animation-name: yb-route; }
  .login .hero-live-request { padding: 10px; }
  .login .hero-live-request strong { font-size: 12px; }
  .login .hero-live-models > div { grid-template-columns: 22px 1fr; gap: 5px; padding: 8px; font-size: 11px; }
  .login .hero-live-models img { width: 22px; height: 22px; }
  .login .hero-live-models small { display: none; }
  .price-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-summary div { min-height: 72px; padding: 12px 8px; border-bottom: 0; border-right: 1px solid var(--ui-border); }
  .price-summary div:last-child { border-right: 0; }
  .price-summary strong { font-size: 19px; }
  .price-summary span { font-size: 10px; white-space: normal; }
  .price-center .result-head { flex-direction: row; align-items: end; flex-wrap: wrap; }
  .price-center :is(.segmented button, .vendor-filters button) { min-height: 44px; }
  .price-table-wrap { max-height: 68vh; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.login, .price-center) *, :is(.login, .price-center) *::before, :is(.login, .price-center) *::after { animation: none !important; transition: none !important; }
  .login .landing-card-grid .landing-card:hover { transform: none; }
}
