/* Cloud Medical UI, 2026-09. Shell styles only; never target exported content. */
.zhan-ui {
  --ui-bg: #f3f6f9;
  --ui-surface: #fff;
  --ui-soft: #edf3f8;
  --ui-ink: #172e43;
  --ui-muted: #52697b;
  --ui-line: #dce5ec;
  --ui-accent: #174f82;
  --ui-on-accent: #fff;
  --ui-shadow: 0 6px 24px rgba(23, 55, 80, .045);
  background: var(--ui-bg);
  color: var(--ui-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-color-mode="dark"] .zhan-ui {
  --ui-bg: #0b1622;
  --ui-surface: #122231;
  --ui-soft: #1b3043;
  --ui-ink: #e6eef5;
  --ui-muted: #b0c0ce;
  --ui-line: #30465a;
  --ui-accent: #98c7ef;
  --ui-on-accent: #122231;
  --ui-shadow: 0 6px 24px rgba(0,0,0,.12);
}
.zhan-ui :is(button, input, select, textarea) { font-family: inherit; }
.zhan-ui :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--ui-accent); outline-offset: 3px; }
.zhan-ui button:disabled { cursor: not-allowed; }
.zhan-ui :is(.platform-ambient-canvas, .workbench-ambient-canvas, .platform-click-hearts, .workbench-click-hearts, .monitor-ambient-canvas, .monitor-click-hearts) { display: none !important; }
.zhan-ui .platform-workbench-return { border-radius: 10px; box-shadow: var(--ui-shadow); border-color: var(--ui-line); background: var(--ui-surface); color: var(--ui-accent); }

/* Portal: readable content, a compact header and a distinct primary action. */
body.zhan-home { background: var(--ui-bg) !important; }
.zhan-home::before, .zhan-home::after { display: none !important; }
.zhan-home [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
.zhan-home .topbar { background: var(--ui-surface) !important; border-bottom: 1px solid var(--ui-line); box-shadow: none; backdrop-filter: none; }
.zhan-home .topbar-inner { max-width: 1280px; min-height: 72px; gap: 22px; padding: 10px 28px; }
.zhan-home .brand-mark { width: 42px; height: 42px; border-radius: 11px; box-shadow: none; }
.zhan-home .brand-title strong { color: var(--ui-ink); font-size: 17px; }
.zhan-home .brand-title small { color: var(--ui-muted); font-size: 11px; }
.zhan-home .top-links { gap: 4px; }
.zhan-home .top-links a { padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--ui-muted); white-space: nowrap; box-shadow: none; }
.zhan-home .top-links a.is-current { background: var(--ui-soft); color: var(--ui-accent); }
.zhan-home .topbar-search { border-radius: 9px; border-color: var(--ui-line); background: var(--ui-bg); }
.zhan-home .account-menu { border: 0; box-shadow: none; gap: 8px; background: transparent; }
.zhan-home .account-identity, .zhan-home .account-profile { color: var(--ui-ink); }
.zhan-home .platform-theme-toggle { border-radius: 9px; border-color: var(--ui-line); background: var(--ui-surface); color: var(--ui-accent); }
.zhan-home:not(.is-authenticated) .hero-band { min-height: 0; margin: 0; padding: 0; background: var(--ui-surface) !important; border-bottom: 1px solid var(--ui-line); overflow: hidden; }
.zhan-home:not(.is-authenticated) .hero-band::before, .zhan-home:not(.is-authenticated) .hero-band::after { display: none !important; }
.zhan-home:not(.is-authenticated) .hero-inner { width: 100%; max-width: 1280px; margin: 0 auto; padding: 56px 28px; min-height: 400px; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 64px; align-items: center; }
.zhan-home:not(.is-authenticated) .hero-copy { width: auto; max-width: none; grid-column: 1; margin: 0; padding: 0; text-align: left; }
.zhan-home:not(.is-authenticated) .hero-inner::after { content: ""; display: block; grid-column: 2; grid-row: 1; aspect-ratio: 4 / 3; width: 100%; max-width: 420px; justify-self: end; border-radius: 24px; background: var(--ui-soft) url('/assets/brand/cloud-workspace.webp') center / cover no-repeat; border: 1px solid var(--ui-line); }
.zhan-home .hero-copy .eyebrow { color: var(--ui-accent); font-size: 13px; letter-spacing: .04em; margin: 0 0 18px; }
.zhan-home .hero-copy h1 { color: var(--ui-ink) !important; -webkit-text-fill-color: var(--ui-ink); background: none; font-size: clamp(32px,4vw,50px); letter-spacing: -.045em; line-height: 1.22; margin: 0 0 22px; }
.zhan-home .hero-copy .lead { color: var(--ui-muted) !important; max-width: 570px; font-size: 15px; line-height: 1.9; margin: 0; }
.zhan-home .hero-actions { display: flex !important; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.zhan-home .hero-actions .action { flex: 0 1 auto; min-height: 44px; padding: 12px 17px; border-radius: 9px; border: 1px solid var(--ui-line); background: var(--ui-surface); color: var(--ui-ink); font-size: 13px; box-shadow: none; white-space: nowrap; }
.zhan-home .hero-actions .action.primary { background: var(--ui-accent); color: var(--ui-on-accent); border-color: var(--ui-accent); }
.zhan-home .hero-actions .action:hover { transform: translateY(-1px); border-color: var(--ui-accent); }
.zhan-home .command-board { display: none !important; }
.zhan-home .showcase-section { max-width: 1280px; padding: 40px 28px 54px; margin: 0 auto; }
.zhan-home .showcase-head { margin-bottom: 24px; }
.zhan-home .showcase-eyebrow, .zhan-home .personal-eyebrow { display: none; }
.zhan-home .showcase-head h2 { color: var(--ui-ink); font-size: 25px; }
.zhan-home .showcase-head p { color: var(--ui-muted); font-size: 14px; }
.zhan-home .showcase-stage { gap: 32px; }
.zhan-home .showcase-browser { border: 1px solid var(--ui-line); border-radius: 16px; box-shadow: var(--ui-shadow); background: var(--ui-surface); }
.zhan-home .showcase-browserbar { background: var(--ui-surface); color: var(--ui-muted); border-color: var(--ui-line); }
.zhan-home .showcase-copy { background: transparent; border: 0; box-shadow: none; padding: 12px 0; }
.zhan-home .showcase-copy h3 { color: var(--ui-ink); font-size: 25px; }
.zhan-home .showcase-copy p { color: var(--ui-muted); line-height: 1.85; }
.zhan-home .showcase-control, .zhan-home .showcase-tab { border-radius: 8px; box-shadow: none; }
.zhan-home footer { color: var(--ui-muted); border-top: 1px solid var(--ui-line); padding-top: 22px; }
.zhan-home.is-authenticated .personal-workbench { background: var(--ui-bg) !important; padding: 32px 28px 48px; }
.zhan-home.is-authenticated .personal-shell { display: block !important; max-width: 1224px; border: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; }
.zhan-home.is-authenticated .personal-head { margin-bottom: 24px; }
.zhan-home.is-authenticated .personal-head h1 { color: var(--ui-ink); font-size: 28px; letter-spacing: -.025em; }
.zhan-home.is-authenticated .workbench-command-grid { display: block !important; }
.zhan-home.is-authenticated .workbench-command-content { width: 100%; max-width: none; }
.zhan-home.is-authenticated .workbench-command-lower { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-top: 20px; }
.zhan-home.is-authenticated .workbench-command-visual { display: none !important; }
.zhan-home.is-authenticated .personal-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--ui-line) !important; border-radius: 14px; background: var(--ui-surface) !important; gap: 0 !important; overflow: hidden; }
.zhan-home.is-authenticated .personal-metric { padding: 20px 24px !important; border: 0 !important; border-right: 1px solid var(--ui-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.zhan-home.is-authenticated .personal-metric:last-child { border-right: 0 !important; }
.zhan-home.is-authenticated .personal-metric strong { color: var(--ui-ink) !important; font-size: 29px; }
.zhan-home.is-authenticated .personal-panel { border: 1px solid var(--ui-line); border-radius: 14px; background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.zhan-home.is-authenticated .personal-panel--services { margin-top: 24px; padding: 24px !important; }
.zhan-home.is-authenticated .product-card { border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: none; background: var(--ui-surface); }
.zhan-home.is-authenticated .personal-panel .personal-eyebrow, .zhan-home.is-authenticated .personal-eyebrow { display: none !important; }

/* Account and monitor: these selectors do not reach the MDIA preview. */
:is(.zhan-account,.zhan-monitor) { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
:is(.zhan-account,.zhan-monitor) :is(.platform-ambient-content,.monitor-ambient-content) > :is(.bg-gray-50,.bg-slate-50,.bg-gray-100,.profile-page) { background: var(--ui-bg) !important; }
:is(.zhan-account,.zhan-monitor) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select) { min-height: 44px; border-radius: 9px; border-color: var(--ui-line); background-color: var(--ui-surface); }
:is(.zhan-account,.zhan-monitor) :is(input,textarea)::placeholder { color: var(--ui-muted); opacity: 1; }
:is(.zhan-account,.zhan-monitor) :is(input,select,textarea):focus { border-color: var(--ui-accent); }
:is(.zhan-account,.zhan-monitor) button { transition: background-color .16s ease,border-color .16s ease; }
:is(.zhan-account,.zhan-monitor) .text-gray-500, :is(.zhan-account,.zhan-monitor) .text-slate-500 { color: var(--ui-muted); }
html[data-color-mode="dark"] :is(.zhan-account,.zhan-monitor) :is(button,a):is(.bg-blue-500,.bg-blue-600,.bg-blue-700,.bg-blue-800).text-white { color: var(--ui-on-accent) !important; }
.zhan-account .platform-ambient-content > .min-h-screen { min-height: 100dvh; padding: 40px 20px 90px; }
.zhan-account .max-w-md.bg-white { max-width: 460px; border: 1px solid var(--ui-line); border-radius: 20px; padding: 36px; box-shadow: var(--ui-shadow); background: var(--ui-surface); }
.zhan-account .max-w-md :is(h1,h2) { font-size: 27px; font-weight: 700; letter-spacing: -.025em; margin-top: 0; line-height: 1.4; }
.zhan-account .max-w-md form > button { min-height: 46px; border-radius: 9px; }
.zhan-account .profile-page { --profile-shadow: var(--ui-shadow); --profile-shadow-raised: var(--ui-shadow); --profile-border: var(--ui-line); }
.zhan-account .profile-header { background: var(--ui-surface); border-bottom: 1px solid var(--ui-line); box-shadow: none; }
.zhan-account :is(.profile-panel,.profile-section,.profile-summary-card) { border-radius: 14px; box-shadow: var(--ui-shadow); }
.zhan-account .profile-hero { border-radius: 18px; box-shadow: none; }
.zhan-monitor nav[aria-label="监测中心顶部导航"] { position: sticky; top: 0; z-index: 40; background: var(--ui-surface); border-color: var(--ui-line); box-shadow: none; }
.zhan-monitor .monitor-topnav-link { border-radius: 8px; font-weight: 600; color: var(--ui-muted); background: transparent; box-shadow: none; }
.zhan-monitor .monitor-topnav-link[aria-current="page"] { color: var(--ui-accent); background: var(--ui-soft); }
.zhan-monitor .monitor-topnav-link::before { display: none; }
.zhan-monitor .monitor-dashboard__hero { border-radius: 16px; box-shadow: none; border-color: var(--ui-line); background: var(--ui-surface); color: var(--ui-ink); }
.zhan-monitor .monitor-dashboard__hero::before { display: none; }
.zhan-monitor :is(.monitor-kpi-card,.monitor-trail-item) { border-radius: 12px; box-shadow: none; border-color: var(--ui-line); }
.zhan-monitor .monitor-kpi-card:hover { transform: none; border-color: var(--ui-accent); }
.zhan-monitor :is(.rounded-lg.bg-white,.rounded-xl.bg-white,.rounded-2xl.bg-white) { border-color: var(--ui-line); box-shadow: var(--ui-shadow); }
.zhan-monitor table { border-collapse: separate; border-spacing: 0; }
.zhan-monitor th { font-weight: 600; color: var(--ui-muted); background: var(--ui-soft); }
.zhan-monitor td { border-color: var(--ui-line); }
.zhan-monitor tbody tr:hover { background: var(--ui-soft); }

/* Resource navigation keeps the restored layout and all access controls. */
.zhan-resources { --bg: var(--ui-bg); --panel: var(--ui-surface); --panel-soft: var(--ui-soft); --ink: var(--ui-ink); --muted: var(--ui-muted); --line: var(--ui-line); --brand: var(--ui-accent); }
.zhan-resources .topbar { background: var(--ui-surface); box-shadow: none; border-color: var(--ui-line); }
.zhan-resources .topbar-inner { min-height: 68px; }
.zhan-resources :is(.search-panel,.category-rail,.result-shell,.toolbar,.side,.gate-card) { border-color: var(--ui-line); border-radius: 14px; box-shadow: var(--ui-shadow); }
.zhan-resources :is(.search-panel,.toolbar) { background: var(--ui-surface); }
.zhan-resources :is(.search-panel h1,.hero h1) { font-size: clamp(24px,2.6vw,32px); letter-spacing: -.03em; }
.zhan-resources :is(.topnav a,.target-chip,.category-button) { border-radius: 8px; }
.zhan-resources :is(input[type=search],.search-line input,.gate-form input) { min-height: 46px; border-radius: 9px; border-color: var(--ui-line); }
.zhan-resources :is(.run-search,.primary-btn,.gate-form button) { border-radius: 9px; min-height: 44px; }
.zhan-resources :is(.resource-card,.source-card) { border-radius: 12px; box-shadow: none; border-color: var(--ui-line); }
.zhan-resources :is(.resource-card,.source-card):hover { border-color: var(--ui-accent); box-shadow: var(--ui-shadow); }

/* MDIA changes are strictly scoped to editor chrome, never .wechat-article,
   .xhs-card, export clones, document backgrounds or user theme typography. */
.zhan-mdia > .app > .toolbar { background: var(--ui-surface); border-color: var(--ui-line); box-shadow: none; min-height: 64px; padding: 12px 20px; }
.zhan-mdia .toolbar .logo { color: var(--ui-ink); font-size: 18px; letter-spacing: -.02em; }
.zhan-mdia .toolbar .btn { border-radius: 8px; min-height: 36px; box-shadow: none; font-size: 12px; }
.zhan-mdia .toolbar .top-work-link { color: var(--ui-muted); font-size: 12px; }
.zhan-mdia .app-sidebar { background: var(--ui-surface); border-color: var(--ui-line); box-shadow: none; }
.zhan-mdia :is(.file-tree-sidebar,.workspace-toolbar) { background: var(--ui-surface); border-color: var(--ui-line); box-shadow: none; }
.zhan-mdia .workspace-toolbar button { border-radius: 7px; min-height: 32px; font-size: 12px; }
.zhan-mdia .file-tree-search input { border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-bg); }
.zhan-mdia :is(.file-tree-panel,.file-tree-header,.editor-toolbar,.editor-header,.settings-header,.preview-header) { border-color: var(--ui-line); background: var(--ui-surface); box-shadow: none; }
.zhan-mdia :is(.file-tree-item,.file-tree-folder,.app-rail-action) { border-radius: 7px; }
.zhan-mdia :is(.file-tree-item,.app-rail-action):focus-visible { outline-color: var(--ui-accent); }
.zhan-mdia .mobile-pc-gate { border: 1px solid var(--ui-line); background: var(--ui-surface); box-shadow: var(--ui-shadow); border-radius: 18px; color: var(--ui-ink); }
.zhan-mdia .mobile-pc-gate p { color: var(--ui-muted); }
.zhan-mdia .mobile-home-top { border-bottom: 1px solid var(--ui-line); }
.zhan-theme-library :is(.topbar,.panel,.sidebar,.theme-card) { border-color: var(--ui-line); border-radius: 12px; box-shadow: var(--ui-shadow); }
.zhan-theme-library .topbar { border-radius: 0; }
.zhan-theme-library { --bg: var(--ui-bg); --panel: var(--ui-surface); --text: var(--ui-ink); --muted: var(--ui-muted); --line: var(--ui-line); }

@media (max-width: 1199px) {
  .zhan-home .topbar-inner { gap: 12px; padding-inline: 20px; }
  .zhan-home .topbar-search { display: none; }
  .zhan-home .top-links a { padding-inline: 10px; }
  .zhan-home:not(.is-authenticated) .hero-inner { gap: 36px; }
}
@media (max-width: 767px) {
  .zhan-home .topbar-inner { display: flex; flex-wrap: wrap; padding: 12px 18px 0; gap: 12px; }
  .zhan-home .brand { flex: 1; min-width: 0; }
  .zhan-home .account-menu { margin-left: auto; }
  .zhan-home .account-name { display: none; }
  .zhan-home .top-links { order: 3; display: flex; width: 100%; flex: 0 0 100%; overflow-x: auto; justify-content: space-between; gap: 2px; padding-bottom: 10px; }
  .zhan-home .top-links a { padding: 8px 6px; font-size: 12px; min-height: 40px; gap: 4px; }
  .zhan-home .top-links .ui-icon { width: 15px; height: 15px; }
  .zhan-home:not(.is-authenticated) .hero-inner { display: block; padding: 34px 20px 38px; min-height: 0; }
  .zhan-home:not(.is-authenticated) .hero-inner::after { display: none; }
  .zhan-home .hero-copy h1 { font-size: 34px; }
  .zhan-home .hero-copy .lead { font-size: 14px; }
  .zhan-home .hero-actions { gap: 8px; }
  .zhan-home .hero-actions .action { justify-content: center; flex: 1 1 auto; padding: 12px; font-size: 12px; }
  .zhan-home .hero-actions .action.primary { flex-basis: 100%; }
  .zhan-home .showcase-section { padding: 28px 20px 36px; }
  .zhan-home .showcase-stage { display: grid; grid-template-columns: 1fr; gap: 18px; }
  .zhan-home .showcase-copy { padding: 0; }
  .zhan-home .showcase-controls { gap: 6px; }
  .zhan-home.is-authenticated .personal-workbench { padding: 22px 16px 36px; }
  .zhan-home.is-authenticated .personal-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .zhan-home.is-authenticated .personal-metric { padding: 16px !important; border-bottom: 1px solid var(--ui-line) !important; }
  .zhan-home.is-authenticated .personal-head h1 { font-size: 25px; }
  .zhan-home.is-authenticated .workbench-command-lower { grid-template-columns: 1fr; }
  .zhan-home.is-authenticated .personal-panel--services { padding: 18px !important; }
  .zhan-account .max-w-md.bg-white { padding: 28px 22px; }
  .zhan-account .max-w-md :is(h1,h2) { font-size: 24px; }
  :is(.zhan-account,.zhan-monitor) input:not([type=checkbox]):not([type=radio]), :is(.zhan-account,.zhan-monitor) select { font-size: 16px; }
  .zhan-resources .topbar-inner { padding-inline: 16px; }
  .zhan-monitor .monitor-ambient-content { padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) {
  .zhan-ui *, .zhan-ui *::before, .zhan-ui *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 420px) {
  .zhan-home .top-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .zhan-home .top-links a { justify-content: center; }
}
