/* Apply the same layout zoom to guest, customer and administrator views. */
:root {
  zoom: .95 !important;
  --product-mark-w: 92px;
  --product-mark-h: 52px;
  --row-mark-w: 60px;
  --row-mark-h: 36px;
  --jf-text: #142034;
  --jf-muted: #34445b;
  --preview-meta: #604c91;
}
html[data-theme=dark] {
  --jf-text: #f2f6fc;
  --jf-muted: #d2ddec;
  --preview-meta: #d2beff;
}
html:lang(zh-CN) body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

html:lang(zh-CN) :is(.admin-workspace,.admin-modal) { font-family: inherit; }
html:not([data-theme=dark]) :is(.admin-workspace,.admin-modal) { --adm-muted: #34445b; }
html[data-theme=dark] :is(.admin-workspace,.admin-modal) { --adm-muted: #d2ddec; }

#overview .intro-copy > p { color: var(--jf-muted); }
.home-browser .home-demo-service :is(strong,b) { font-size: 14px; font-weight: 600; }
.home-browser .home-demo-service small { color: var(--preview-meta); font-size: 12px; }
.home-browser .home-demo-service.selected strong { color: var(--jf-blue); }
.home-browser :is(.home-mini-search,.home-selected small), .home-browser > footer {
  color: var(--jf-muted); font-size: 12px;
}
#catalog .directory-price .regular-price { color: var(--jf-muted); }
#catalog .member-price-pair.has-discount .actual-price { color: var(--jf-green); }
#historyRows .history-table th { color: var(--jf-muted); font-weight: 650; }
#historyRows :is(.history-input,.history-date small,.history-result,.history-result-key > small) {
  color: var(--jf-text); font-size: 14px; font-weight: 500;
}
#historyRows .history-input:not([data-i18n-original]) { font-family: inherit; }
#historyRows .order-number-distributor { text-shadow: none; }
#historyRows .order-number-distributor::after { opacity: .12; }
#historyRows[aria-busy="true"] { opacity: 1; }

/* Use the existing card tracks, navigation rows, and wrapping shortcut buttons. */
#catalog .directory-card { grid-template-columns: var(--product-mark-w) minmax(0,1fr) auto; }
#catalog .directory-card > .service-tile, #serviceDetail .checkout-service-header .service-tile {
  width: var(--product-mark-w); height: var(--product-mark-h);
  padding: 0 !important; border: 0; background: transparent !important;
}
#supportedTools .home-tools > button > span > img {
  width: var(--product-mark-w); height: 100%;
  max-width: 100%; max-height: var(--product-mark-h); object-fit: contain;
}
#homeToolChips > button { flex: 0 0 auto; max-width: 100%; }
#homeToolChips > button > span { min-width: 0; overflow-wrap: anywhere; }
#homeToolChips img {
  flex: none; width: 42px; height: 28px; object-fit: contain;
}
#popularServices .home-pop-icon, #detailNavigator .detail-nav-service img,
#historyRows .history-service img, .admin-product-cell > div > img {
  flex: none; box-sizing: border-box; width: var(--row-mark-w); height: var(--row-mark-h);
  padding: 0; border: 0; border-radius: 0; background: transparent; object-fit: contain;
}
#historyRows .history-service strong { min-width: 0; }

@media (max-width: 700px) {
  :root { --product-mark-w: 68px; --product-mark-h: 42px; --row-mark-w: 48px; --row-mark-h: 32px; }
  #catalog .directory-price .member-price-pair { flex-wrap: wrap; }
  #homeToolChips img { width: 36px; height: 26px; }
}
@media (max-width: 480px) {
  #serviceDetail .checkout-service-header { grid-template-columns: var(--product-mark-w) minmax(0,1fr); }
}

/* Transparent logos with dark lettering need a light foreground in night mode. */
html[data-theme=dark] img:is(
  [src$="/7b724d5d52d9a005.png"], [src$="/ddc29d224a250546.png"],
  [src$="/01473636652b190c.webp"], [src$="/0d330e4bef1b0788.png"],
  [src$="/1141ac0e882f2735.png"], [src$="/152e5482ef77ba80.webp"],
  [src$="/454182afb9171eda.webp"], [src$="/63c951b5b8dc8f2d.png"],
  [src$="/6a236686cdd0d5d0.webp"], [src$="/95527651f9b01db8.png"],
  [src$="/972b8fe5183a741b.webp"], [src$="/ae2287d6acb25260.webp"],
  [src$="/ccbb3cd9d8dc6264.webp"], [src$="/cd0f4658604cf95a.webp"]
) { filter: invert(1) hue-rotate(180deg); }

/* Paint the landing backdrop on the full page width, outside the centred content column. */
body:has(#overview.home-hero:not([hidden])) {
  --landing-paper: #f6f8fa;
  background-color: var(--landing-paper);
}
html[data-theme=dark] body:has(#overview.home-hero:not([hidden])) { --landing-paper: #0e1725; }
.workspace:has(> main > #overview.home-hero:not([hidden])) {
  --landing-violet: rgb(162 141 219 / 20%);
  --landing-blue: rgb(104 143 211 / 22%);
  --landing-grid: rgb(84 108 146 / 8%);
  background-color: var(--landing-paper);
  background-image:
    linear-gradient(to bottom, transparent 125px, var(--landing-paper) 540px),
    linear-gradient(to right, var(--landing-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--landing-grid) 1px, transparent 1px),
    radial-gradient(ellipse 35% 245px at 12% 55px, var(--landing-violet), transparent),
    radial-gradient(ellipse 43% 365px at 78% 138px, var(--landing-blue), transparent);
  background-size: auto, 72px 72px, 72px 72px, auto, auto;
}
html[data-theme=dark] .workspace:has(> main > #overview.home-hero:not([hidden])) {
  --landing-violet: rgb(112 77 161 / 20%);
  --landing-blue: rgb(60 114 183 / 24%);
  --landing-grid: rgb(159 184 216 / 8%);
}
#overview.intro { background: transparent; }
#overview.intro::before { content: none; }

/* These panels wrap entire routes; their cards provide the individual surfaces. */
html[data-theme=dark] :is(#catalog, #memberPanel).portal-panel { background-color: transparent; }

/* Bring the tint to zero at both edges of its decorative area. */
#services .home-category::before {
  background: radial-gradient(ellipse 100% 100% at top right, rgb(204 218 245 / 35%), transparent 100%);
}
html[data-theme=dark] #services .home-category::before {
  background: radial-gradient(ellipse 100% 100% at top right, rgb(80 117 168 / 18%), transparent 100%);
}
