/* Layout A: original application structures, compact overview and optional tools.
   Monitor selectors require the web return component; WeChat has no such component. */
.zhan-portal .brand{min-height:66px}
.zhan-portal .brand-mark{width:40px;height:40px}
.zhan-portal .brand-title strong{font-size:23px}
.zhan-portal .top-links{min-height:44px;gap:30px}
.zhan-portal .top-links a{padding:8px 6px 7px;font-size:13px}
.zhan-portal main{padding-top:20px}
.zhan-portal .portal-welcome{gap:20px;grid-template-columns:minmax(0,2.6fr) minmax(250px,1fr)}
.zhan-portal .portal-welcome-copy{padding:18px 24px}
.zhan-portal .portal-welcome-copy>.portal-eyebrow{display:none}
.zhan-portal .portal-welcome h1{font-size:27px;margin:6px 0;line-height:1.45}
.zhan-portal .portal-welcome p{margin-bottom:12px}
.zhan-portal .portal-search-hints{margin-top:9px}
.zhan-portal .portal-daily{padding:16px 22px}
.zhan-portal .portal-daily h2{font-size:25px;margin:5px 0;line-height:1.4}
.zhan-portal .portal-daily-links{margin-top:8px;padding-top:8px}
.zhan-portal .portal-services{margin-top:18px}
.zhan-portal .workspace-product{padding:17px 20px 13px;display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:12px;min-height:156px}
.zhan-portal .workspace-product-icon{width:34px;height:34px;margin:0;border-radius:8px;grid-column:1;grid-row:1}
.zhan-portal .workspace-product-copy{grid-column:2;grid-row:1;min-width:0}
.zhan-portal .workspace-product-title{display:flex;align-items:start;justify-content:space-between;gap:8px}
.zhan-portal .workspace-product-title strong{font-size:16px}
.zhan-portal .workspace-product-copy p{margin:5px 0 9px;font-size:12px}
.zhan-portal .workspace-product-scope{clear:both;line-height:1.65;font-size:11px}
.zhan-portal .workspace-product-action{margin-top:10px;padding-top:9px;grid-column:1/-1}
.zhan-portal .workspace-status{position:static;flex-shrink:0;font-size:10px;padding:2px 5px}
.zhan-portal .workspace-product-stats{margin-top:7px;padding-top:7px;grid-column:1/-1}
.zhan-portal .portal-guest-grid,.zhan-portal .portal-personal-grid{margin-top:18px;gap:20px}
.zhan-portal .personal-metrics{margin-top:18px}
.zhan-portal .personal-metric{padding:12px 18px}
.zhan-portal .portal-panel,.zhan-portal .personal-panel{padding:18px 21px}

/* Resources keep native categories, catalog and account-backed personal lists. */
.zhan-resources main[data-catalog]{padding-top:18px}
.zhan-resources #resource-nav{border-radius:8px;box-shadow:none}
.zhan-resources .hero-line{padding:18px 20px 10px;min-height:0;background:var(--ui-surface)}
.zhan-resources .hero-line h1{font-size:25px;line-height:1.4;margin:0}
.zhan-resources .hero-line p{font-size:13px;margin:6px 0 0}
.zhan-resources .hero-line__aside:empty{display:none}
.zhan-resources .search-body{padding:8px 18px 14px}
.zhan-resources .search-line input,.zhan-resources .run-search{min-height:44px;height:44px}
.zhan-resources .search-targets{margin-top:10px;gap:8px}
.zhan-resources .target-chip{min-height:36px;padding:8px 12px}
.zhan-resources .resource-filter-drawer{margin-top:10px}
.zhan-resources .resource-filter-drawer summary{padding:10px 12px;min-height:38px;font-size:12px}
.zhan-resources .workspace{grid-template-columns:210px minmax(0,1fr);gap:18px;margin-top:18px}
.zhan-resources .category-rail{position:sticky;top:16px;max-height:calc(100dvh - 32px);overflow:auto;border-radius:8px}
.zhan-resources .category-buttons button{min-height:36px}
.zhan-resource-views{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
.zhan-resource-views button{background:var(--ui-surface);color:var(--ui-muted);border:1px solid var(--ui-line);border-radius:5px;padding:8px 14px;font:500 13px/1.5 "Microsoft YaHei",sans-serif;cursor:pointer}
.zhan-resource-views button[aria-selected=true]{color:var(--ui-accent-text);background:var(--ui-selected);border-color:var(--ui-accent-border)}
.zhan-resource-views button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}
.zhan-resources .result-shell .personal-resources{max-width:none;background:var(--ui-surface);padding:18px;border:1px solid var(--ui-line);border-radius:8px}
.zhan-resources .result-shell .personal-resources__grid{grid-template-columns:1fr}
.zhan-resources [data-zhan-resource-panel][hidden]{display:none!important}
.zhan-resources .result-shell:has([data-zhan-resource-tab][aria-selected=true]:not([data-zhan-resource-tab=catalog])) .summary{display:none}
.zhan-resources .resource-grid{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Web monitoring: compact overview followed by the native updates and health. */
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard>main{padding-top:16px;padding-bottom:24px}
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard>main>div{padding-top:6px;padding-bottom:16px}
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero{padding:0 0 18px;margin-bottom:18px;gap:14px;background:transparent!important;border:0;border-bottom:1px solid var(--ui-line);border-radius:0}
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero>div:first-child>p:first-child{display:none}
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero h1{font-size:27px;margin-top:0;line-height:1.4}
.zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero>div:first-child>p{font-size:13px;margin-top:6px}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-bottom:24px;border:1px solid var(--ui-line);background:var(--ui-surface);border-radius:8px;overflow:hidden}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card{padding:14px 18px;border:0;border-right:1px solid var(--ui-line);border-radius:0;box-shadow:none;transform:none}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card:last-child{border-right:0}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card::after{display:none}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card>p{display:none}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card>div{align-items:center;gap:10px}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card>div>span{width:32px;height:32px;border:0;background:var(--ui-soft)}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-value{font-size:24px;line-height:1.2;margin-top:6px}
.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-grid+div{grid-template-columns:minmax(0,2.1fr) minmax(300px,1fr);gap:22px;align-items:start}
.zhan-monitor:has(.platform-workbench-return) .monitor-activity-card{padding:18px;border-radius:8px;box-shadow:none}

/* Account grouping uses the original sections and native anchors. */
.zhan-account .profile-page{padding-top:20px}
.zhan-account .profile-sidebar{top:18px}
.zhan-account .profile-sidebar nav{gap:5px}
.zhan-account .profile-section-stack>section[hidden]{display:none!important}
.zhan-account .profile-section-stack{align-content:start}
.zhan-account .profile-nav-link[data-zhan-active=true]{background:var(--ui-selected)!important;color:var(--ui-accent-text)!important;box-shadow:inset 3px 0 var(--ui-accent)}
.zhan-account .profile-nav-link[data-zhan-active=false]{background:transparent!important;box-shadow:none!important;color:var(--ui-muted)!important}
.zhan-account .profile-section-stack>section:focus{outline:none}

/* Editor: use native view switching, divider, side-panel and dialog controls. */
@media(min-width:981px){
 .zhan-mdia:not(.file-tree-collapsed) .file-tree-sidebar{width:230px;min-width:230px;flex-basis:230px}
 .zhan-mdia .workspace-shell{container-type:inline-size;container-name:mdia-workspace}
 .zhan-mdia .workspace-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title actions" "menus controls";grid-template-rows:42px 34px;align-items:center;gap:0 16px;padding:0 12px!important;min-height:0;height:auto!important;flex:0 0 auto!important;border-top:0!important;border-bottom:1px solid var(--ui-line);box-shadow:none;background:linear-gradient(to bottom,var(--ui-surface) 42px,var(--ui-bg) 42px)!important}
 .zhan-mdia .workspace-toolbar>div,.zhan-mdia .workspace-toolbar>nav{min-height:0;height:auto;padding:0}
 .zhan-mdia .workspace-toolbar .editor-tools{min-height:0;height:auto;flex-wrap:nowrap;gap:1px}
 .zhan-mdia .workspace-toolbar-title{grid-area:title;min-width:0;max-width:none}
 .zhan-mdia .workspace-toolbar-title .editor-title-area{max-width:100%;min-width:0}
 .zhan-mdia .workspace-toolbar-title .editor-file-title{max-width:100%;width:auto}
 .zhan-mdia .workspace-toolbar .editor-brand-title{font-size:12px;font-weight:500;flex-shrink:0;color:var(--ui-muted);display:inline-flex;align-items:center}
 .zhan-mdia .workspace-toolbar .editor-brand-title img{width:18px!important;height:18px!important}
 .zhan-mdia .workspace-toolbar .editor-document-title{max-width:none;min-width:0;flex:1;height:28px;font-size:14px;font-weight:500;padding:0 10px;color:var(--ui-ink);border-left:1px solid var(--ui-line);border-radius:0}
 .zhan-mdia .workspace-toolbar-actions{grid-area:actions;justify-content:flex-end;min-width:0;border:0;margin:0}
 .zhan-mdia .workspace-toolbar .preview-primary-controls{gap:8px;background:transparent;border:0;box-shadow:none}
 .zhan-mdia .workspace-toolbar-menus{grid-area:menus;min-width:0;overflow:visible}
 .zhan-mdia .workspace-toolbar-meta{display:none!important}
 .zhan-mdia .zhan-workspace-controls{grid-area:controls;justify-self:end;display:flex;align-items:center;gap:10px;min-width:0}
 .zhan-mdia .workspace-toolbar :is(.btn-fmt-toggle,.preview-compact-toggle){height:28px!important;min-height:28px!important;padding:0 8px!important;font-size:12px;font-weight:400;line-height:28px;border-radius:4px}
 .zhan-mdia .workspace-toolbar .preview-publish-toggle{height:30px!important;min-height:30px!important;padding:0 14px!important;font-size:12px;font-weight:500;border-radius:5px;box-shadow:none}
 .zhan-mdia .workspace-toolbar .preview-export-toggle{border:1px solid var(--ui-line);background:var(--ui-surface);min-width:62px}
 .zhan-mdia .workspace-toolbar .preview-mode-switcher{height:26px;min-height:26px;gap:2px;margin:0;padding:0;border:0;border-radius:0;background:transparent!important;box-shadow:none}
 .zhan-mdia .workspace-toolbar .preview-mode-button{width:26px;min-width:26px;height:26px;min-height:26px;padding:5px;border-radius:4px;border:0;box-shadow:none}
 .zhan-mdia .workspace-toolbar .preview-mode-button svg{width:15px;height:15px}
 .zhan-mdia .workspace-toolbar .preview-mode-button.active{background:var(--ui-selected)!important}
 .zhan-mdia .zhan-workspace-controls #previewMoreDropdown>.dropdown-menu{right:0;left:auto}
 .zhan-mdia .workspace-toolbar .dropdown-menu{max-height:var(--zhan-menu-space,calc(100dvh - 160px))!important;max-width:var(--zhan-menu-width,calc(100vw - 32px));min-width:min(160px,var(--zhan-menu-width,160px));overflow-y:auto;overscroll-behavior:contain}
 .zhan-mdia .preview-settings-panel{width:280px;min-width:280px;flex-basis:280px;border-color:var(--ui-line);background:var(--ui-surface)}
 .zhan-mdia.preview-settings-collapsed .preview-settings-panel{width:0;min-width:0;flex-basis:0}
 .zhan-mdia .preview-settings-panel>.preview-settings-group:not(.preview-typography-panel):not(.preview-settings-station-group){display:none}
 .zhan-mdia .preview-settings-panel>.preview-settings-title{display:none}
 .zhan-mdia .preview-settings-panel>.preview-typography-panel{margin-top:0}
 .zhan-mdia:not(.preview-typography-panel-active) .preview-settings-panel>.preview-typography-panel{display:none}
 .zhan-mdia .preview-settings-station-group{padding-top:12px}
 .zhan-mdia .workspace-docked-panel{width:320px;min-width:280px;max-width:38%;flex-basis:320px}
 .zhan-mdia .mdia-first-use-guide{margin:8px 10px 0;padding:10px 12px;grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .zhan-mdia .mdia-first-use-guide__copy p{font-size:11px}
}
.zhan-mdia .zhan-guide-return{border:0;background:transparent;color:var(--ui-accent);font-size:12px;padding:8px 12px;cursor:pointer;text-align:left}
.zhan-mdia .mdia-first-use-guide[hidden]{display:none!important}
.zhan-mdia .zhan-settings-empty{padding:16px 12px;color:var(--ui-muted);font-size:12px;line-height:1.8}
.zhan-mdia .zhan-settings-empty button{display:block;width:100%;margin-top:12px;background:var(--ui-soft);color:var(--ui-accent);border:1px solid var(--ui-line);border-radius:5px;padding:8px;cursor:pointer}
.zhan-mdia.preview-typography-panel-active .zhan-settings-empty{display:none}

/* Original theme previews stay intact. Expanded details occupy their own row. */
.zhan-theme-library #themeGrid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.zhan-theme-library #themeGrid .theme-card.is-open{grid-column:1/-1}
.zhan-theme-library .theme-card-head{grid-template-columns:auto minmax(0,1fr);gap:10px}
.zhan-theme-library .theme-card-head>.theme-card-actions{grid-column:1/-1}
.zhan-theme-library .theme-card-title{min-width:0;overflow-wrap:anywhere}
.zhan-theme-library .theme-card-actions{flex-wrap:wrap}

@media(min-width:981px) and (max-width:1199px){
 .zhan-mdia:not(.file-tree-collapsed) .file-tree-sidebar{width:205px;min-width:205px;flex-basis:205px}
 .zhan-mdia .mdia-first-use-guide{grid-template-columns:1fr}
 .zhan-mdia .preview-settings-panel{width:240px;min-width:240px;flex-basis:240px}
}
@container mdia-workspace (max-width:650px){
 .zhan-mdia .workspace-toolbar .editor-brand-title{font-size:0}
 .zhan-mdia .workspace-toolbar .editor-document-title{padding-left:4px;font-size:13px}
}
@container mdia-workspace (max-width:480px){
 .zhan-mdia .workspace-toolbar{grid-template-areas:"title actions" "menus menus" "controls controls";grid-template-rows:40px 32px 34px;column-gap:8px;padding:0 8px!important;background:linear-gradient(to bottom,var(--ui-surface) 40px,var(--ui-bg) 40px)!important}
 .zhan-mdia .zhan-workspace-controls{justify-self:stretch;justify-content:flex-end;border-top:1px solid var(--ui-line)}
}
@media(max-width:980px){.zhan-theme-library #themeGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){
 .zhan-portal .brand{min-height:64px}.zhan-portal .brand-mark{width:36px;height:36px}.zhan-portal .brand-title strong{font-size:21px}
 .zhan-portal .top-links{gap:0;min-height:44px}.zhan-portal .top-links a{font-size:11px;padding:8px 3px}
 .zhan-portal main{display:flex;flex-direction:column;padding-top:16px;gap:16px}
 .zhan-portal .portal-welcome{display:contents}.zhan-portal .portal-welcome-copy{order:1;padding:20px}
 .zhan-portal .portal-welcome h1{font-size:24px}.zhan-portal .portal-services{order:2;margin:0}
 .zhan-portal #personal-workbench{order:3}.zhan-portal .portal-guest-grid{order:4;margin:0}
 .zhan-portal .portal-daily{order:5;padding:18px 20px;min-height:156px}.zhan-portal .portal-daily h2{font-size:24px;margin:8px 0}
 .zhan-portal .portal-footnote{order:6;padding:4px 0 20px}
 .zhan-portal .workspace-product{padding:15px 17px 12px}.zhan-portal .workspace-product-icon{float:none;width:34px;height:34px;margin:0}
 .zhan-portal .workspace-product-title strong{font-size:16px}.zhan-portal .workspace-product-scope{font-size:10px}
 .zhan-portal .personal-metrics{margin-top:0}.zhan-portal .portal-panel,.zhan-portal .personal-panel{padding:18px}
 .zhan-resources .hero-line{padding:14px 15px 7px}.zhan-resources .hero-line h1{font-size:21px}
 .zhan-resources .search-body{padding:8px 13px 12px}.zhan-resources .search-line input{font-size:16px}
 .zhan-resources .search-targets{display:flex;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
 .zhan-resources .target-chip{flex:0 0 auto;width:auto;white-space:nowrap}
 .zhan-resources .workspace{grid-template-columns:1fr;gap:12px}.zhan-resources .category-rail{position:static;max-height:none}
 .zhan-resource-views{gap:5px}.zhan-resource-views button{padding:8px 11px;font-size:12px}
 .zhan-resources .resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .zhan-monitor:has(.platform-workbench-return) .monitor-dashboard>main{padding-top:10px}
 .zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero{padding-bottom:14px;gap:12px}
 .zhan-monitor:has(.platform-workbench-return) .monitor-dashboard__hero h1{font-size:24px}
 .zhan-monitor:has(.platform-workbench-return) .monitor-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:18px}
 .zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card{padding:12px;border-bottom:1px solid var(--ui-line)}
 .zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card:nth-child(2){border-right:0}
 .zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card:nth-child(n+3){border-bottom:0}
 .zhan-monitor:has(.platform-workbench-return) .monitor-kpi-grid+div{grid-template-columns:1fr;gap:20px}
 .zhan-account .profile-sidebar{position:static}.zhan-account .profile-sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .zhan-theme-library #themeGrid{grid-template-columns:1fr}
}
@media(max-width:520px){.zhan-resources .resource-grid{grid-template-columns:1fr}}
@media(max-width:380px){.zhan-monitor:has(.platform-workbench-return) .monitor-kpi-card>div>span{display:none}}

/* Resource pages: shared reading rhythm, native categories and source links. */
.zhan-resources .category-section{padding:16px;margin-bottom:16px}
.zhan-resources .category-title{font-size:17px}
.zhan-resources .resource-card{min-height:104px;padding:13px;border-radius:8px}
.zhan-resources .resource-grid{gap:10px}
.zhan-resource-notices .shell{max-width:1320px;padding:20px 20px 40px}
.zhan-resource-notices .hero{padding:18px 20px;margin-bottom:16px;border-radius:8px}
.zhan-resource-notices .hero h1{font-size:25px;line-height:1.4}
.zhan-resource-notices .hero p{font-size:13px;margin-top:7px;line-height:1.7}
.zhan-resource-notices .toolbar{position:static;padding:14px;margin-bottom:16px;gap:10px;backdrop-filter:none}
.zhan-resource-notices .search-row{gap:10px}
.zhan-resource-notices .search-row input,.zhan-resource-notices .primary-btn{min-height:44px;height:44px;font-size:14px}
.zhan-resource-notices .chip{font-size:13px;min-height:34px;padding:0 12px}
.zhan-resource-notices .layout{grid-template-columns:minmax(0,1fr) 280px;gap:18px}
.zhan-resource-notices .grid{gap:12px}
.zhan-resource-notices :is(.source-card,.notice-card,.side-card){padding:15px;border-radius:8px;gap:8px;min-width:0}
.zhan-resource-notices .side{position:sticky;top:88px;align-self:start;gap:16px}
.zhan-resource-notices .side>section{padding:14px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface)}

/* Monitor pages keep native routes and content order while sharing page width. */
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main{width:100%;max-width:1280px;margin:0 auto;padding:24px 32px 40px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main>.zhan-monitor-content{padding:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading{margin:0 0 20px;padding:0 0 18px;border-bottom:1px solid var(--ui-line);gap:14px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading h1{font-size:26px;line-height:1.4;letter-spacing:0;margin:0;color:var(--ui-ink)}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading p{font-size:13px;line-height:1.7}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading :is(button,a){flex-shrink:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main :is(button,a[class*="bg-blue-"]){border-radius:6px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main :is(section,div).bg-white{border-radius:8px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select){min-height:40px;min-width:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main .text-center.bg-white{border:1px solid var(--ui-line);padding:48px 20px;border-radius:8px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main .text-center.bg-white button{min-height:40px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage{margin-bottom:14px;padding:10px 14px;gap:12px;background:var(--ui-soft);border-color:var(--ui-line);border-radius:8px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage>div{background:transparent;padding:0;border-radius:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin-bottom:14px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface);overflow:hidden}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div{padding:10px 16px;border:0;border-right:1px solid var(--ui-line);border-radius:0!important}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div:last-child{border-right:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats p:last-child{font-size:22px;line-height:1.3;margin-top:4px}
.zhan-monitor:has(.platform-workbench-return) :is(.zhan-subscription-test,.zhan-subscription-filter){padding:14px 16px;margin-bottom:14px;border-radius:8px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-test h2{font-size:14px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-test p{font-size:12px;line-height:1.65}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog{gap:16px;margin-bottom:16px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog>div>div:first-child{padding:12px 16px;background:var(--ui-soft)}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom{padding:16px;margin-bottom:16px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom form{grid-template-columns:repeat(3,minmax(0,1fr))}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom h2{font-size:15px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save{padding:12px 16px;margin-top:16px;border-radius:8px;gap:12px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save button{min-height:40px}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div{padding:20px;border:1px solid var(--ui-line)}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div>div:first-child{gap:12px;align-items:flex-start}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div>div:first-child>span{flex-shrink:0;white-space:nowrap}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div>div:first-child>div{min-width:0}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div h3{overflow-wrap:anywhere}
.zhan-monitor:has(.platform-workbench-return)[data-zhan-monitor-page="channels"] .zhan-monitor-content>.grid>div>div:last-child{flex-wrap:wrap}
@media(min-width:1024px){
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog{grid-template-columns:260px minmax(0,1fr)}
}
@media(max-width:1023px){
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main{padding:20px 24px 100px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-filter>div{grid-template-columns:minmax(0,1fr) 140px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-filter input:not([type=checkbox]){grid-column:1/-1}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog>div:first-child>div.overflow-y-auto{max-height:240px}
 .zhan-resource-notices .layout{grid-template-columns:minmax(0,1fr) 240px}
}
@media(max-width:767px){
 .zhan-resources .category-section{padding:12px}
 .zhan-resource-notices .shell{padding:16px 14px 28px}
 .zhan-resource-notices .hero{padding:16px}
 .zhan-resource-notices .hero h1{font-size:22px}
 .zhan-resource-notices .toolbar{padding:12px}
 .zhan-resource-notices .layout{grid-template-columns:1fr}
 .zhan-resource-notices .side{position:static}
 .zhan-resource-notices .grid{grid-template-columns:1fr}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main{padding:20px 16px 100px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading{margin-bottom:16px;padding-bottom:14px;flex-wrap:wrap;align-items:flex-start}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-heading h1{font-size:23px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main :is(button,a[class*="bg-blue-"]){min-height:40px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div:nth-child(2){border-right:0}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div:nth-child(-n+2){border-bottom:1px solid var(--ui-line)}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom form{grid-template-columns:minmax(0,1fr)}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save button{width:100%}
 .zhan-monitor:has(.platform-workbench-return) .fixed.inset-0:has(form){padding:12px;align-items:flex-start}
 .zhan-monitor:has(.platform-workbench-return) .fixed.inset-0:has(form)>.bg-white{margin:0;max-height:calc(100dvh - 24px)}
 .zhan-monitor:has(.platform-workbench-return) .fixed.inset-0 form .grid-cols-2{grid-template-columns:minmax(0,1fr)}
}

/* Layout B: search and results first; optional subscription creation stays folded. */
.zhan-resources #resource-nav{display:grid;grid-template-columns:270px minmax(0,1fr);align-items:start}
.zhan-resources #resource-nav .hero-line{display:block;min-width:0;padding:24px 20px;border:0}
.zhan-resources #resource-nav .hero-line h1{font-size:23px;line-height:1.4}
.zhan-resources #resource-nav .hero-line p{font-size:12px;line-height:1.8;margin-top:8px}
.zhan-resources #resource-nav .search-body{display:block;padding:18px;min-width:0;border:0}
.zhan-resources #resource-nav .search-line{gap:10px}
.zhan-resources #resource-nav .search-line input{height:44px!important;min-height:44px!important}
.zhan-resources #resource-nav .search-targets{display:flex;align-items:center;gap:6px;margin:10px 0 0;overflow-x:auto;flex-wrap:nowrap}
.zhan-resources #resource-nav .target-chip{flex:0 0 auto;width:auto!important;min-height:32px;padding:6px 12px;font-size:12px;white-space:nowrap}
.zhan-resources #resource-nav .resource-filter-drawer{margin-top:10px;border:0;background:var(--ui-bg);border-radius:6px}
.zhan-resources #resource-nav .resource-filter-drawer summary{min-height:30px;padding:6px 10px;font-size:12px;line-height:1.5}
.zhan-resources .workspace{margin-top:18px;gap:18px}
.zhan-resources .category-rail{top:calc(var(--zhan-header-height,68px) + 12px);max-height:calc(100dvh - var(--zhan-header-height,68px) - 28px)}
.zhan-resource-resultbar{display:flex;align-items:center;justify-content:space-between;gap:14px;position:sticky;top:calc(var(--zhan-header-height,68px) + 12px);z-index:9;padding:10px 12px;margin:0 0 14px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface)}
.zhan-resource-resultbar .zhan-resource-views{margin:0;padding:0;border:0;flex-wrap:nowrap;flex-shrink:0;gap:4px}
.zhan-resource-resultbar .zhan-resource-views button{padding:7px 10px;min-height:34px;border-color:transparent;background:transparent;font-size:12px}
.zhan-resource-resultbar .zhan-resource-views button[aria-selected=true]{background:var(--ui-selected);border-color:var(--ui-accent-border)}
.zhan-resources .zhan-resource-resultbar .summary{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0;padding:0;border:0;background:transparent!important;font-size:11px;text-align:right;line-height:1.6}
.zhan-resources .zhan-resource-resultbar #medichome-clear-filters{flex-shrink:0;font-size:11px}
.zhan-resources :is(.resource-card,.category-section){scroll-margin-top:calc(var(--zhan-header-height,68px) + 86px)}
.zhan-resources .category-section{border-radius:8px}
.zhan-resource-notices .zhan-notice-filter-row{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:10px}
.zhan-resource-notices .zhan-filter-label{color:var(--ui-muted);font-size:12px;white-space:nowrap}
.zhan-resource-notices .side{top:calc(var(--zhan-header-height,68px) + 12px)}

.zhan-monitor:has(.platform-workbench-return) .monitor-activity-section{border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface);overflow:hidden}
.zhan-monitor:has(.platform-workbench-return) .monitor-activity-section>div:first-child{margin:0;padding:14px 18px;border-bottom:1px solid var(--ui-line);background:var(--ui-soft)}
.zhan-monitor:has(.platform-workbench-return) .monitor-activity-section>div:first-child h2{font-size:16px;font-weight:600}
.zhan-monitor:has(.platform-workbench-return) .monitor-activity-section .monitor-activity-card{margin:0;padding:18px;border:0;border-radius:0;box-shadow:none}
.zhan-monitor:has(.platform-workbench-return) .monitor-activity-card>div+div{border-top:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-filterbar{padding:12px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-surface);gap:10px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-filterbar button{min-height:36px}
.zhan-monitor:has(.platform-workbench-return) .zhan-monitor-filterbar input{min-width:160px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom>div:first-child{margin:0}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom form[hidden]{display:none!important}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom[data-expanded=false]>div>p{display:none}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom[data-expanded=true] form{margin-top:16px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom{padding:4px 16px}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-custom[data-expanded=true]{padding-bottom:16px}
.zhan-monitor:has(.platform-workbench-return) .zhan-disclosure-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-height:44px;padding:8px 0;background:transparent;border:0;color:var(--ui-ink);font-size:13px;font-weight:600;text-align:left;cursor:pointer}
.zhan-monitor:has(.platform-workbench-return) .zhan-disclosure-hint{flex-shrink:0;color:var(--ui-accent-text);font-size:12px;font-weight:500}
.zhan-monitor:has(.platform-workbench-return) .zhan-coverage-toggle{display:none}
.zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save{position:sticky;bottom:16px;z-index:15;border-color:var(--ui-accent-border);box-shadow:0 4px 16px #153f5f0d}
@media(min-width:1024px){
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main:has(.zhan-subscription-coverage){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px 16px;align-items:stretch}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main:has(.zhan-subscription-coverage)>*{grid-column:1/-1;margin:0}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main>.zhan-subscription-coverage{grid-column:1;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding:12px 16px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main>.zhan-subscription-stats{grid-column:2;align-self:stretch}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div{display:flex;flex-direction:column;justify-content:center;padding:12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog{grid-template-columns:240px minmax(0,1fr);gap:16px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog>div:first-child{align-self:start;position:sticky;top:calc(var(--zhan-header-height,64px) + 12px)}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-catalog>div:first-child>.overflow-y-auto{max-height:calc(100dvh - var(--zhan-header-height,64px) - 180px)}
}
@media(min-width:1280px){
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-main>.zhan-subscription-coverage{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-content:center}
}
@media(max-width:1023px){
 .zhan-resources #resource-nav{grid-template-columns:220px minmax(0,1fr)}
 .zhan-resources #resource-nav .hero-line{padding:20px 16px}
 .zhan-resources #resource-nav .hero-line h1{font-size:21px}
 .zhan-resource-resultbar{flex-wrap:wrap;gap:8px}
 .zhan-resources .zhan-resource-resultbar .summary{text-align:left;justify-content:flex-start}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save{bottom:calc(76px + env(safe-area-inset-bottom))}
}
@media(max-width:767px){
 .zhan-resources #resource-nav{display:block}
 .zhan-resources #resource-nav .hero-line{padding:16px 16px 4px}
 .zhan-resources #resource-nav .hero-line p{margin-top:5px}
 .zhan-resources #resource-nav .search-body{padding:10px 14px 14px}
 .zhan-resources #resource-nav .search-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .zhan-resources #resource-nav .search-line input{font-size:14px}
 .zhan-resources #resource-nav .run-search{width:auto;min-width:84px;font-size:13px;padding:0 12px}
 .zhan-resources .category-rail{position:static;display:flex;align-items:center;max-height:none;padding:10px}
 .zhan-resources .category-rail .rail-title{padding:0 10px 0 0;border:0;font-size:12px;white-space:nowrap;flex-shrink:0}
 .zhan-resources .category-rail .category-buttons{flex:1;min-width:0;padding:0}
 .zhan-resource-resultbar{position:static;padding:8px;gap:6px}
 .zhan-resource-resultbar .zhan-resource-views{width:100%;gap:4px;justify-content:space-between}
 .zhan-resource-resultbar .zhan-resource-views button{padding:7px 9px}
 .zhan-resource-notices .zhan-notice-filter-row{grid-template-columns:1fr;gap:6px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-filterbar{padding:10px;gap:8px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-monitor-filterbar input{width:100%;min-width:0}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage{padding:4px 12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-coverage-toggle{display:flex;grid-column:1/-1}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage[data-expanded=false]>div{display:none}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-coverage[data-expanded=true]{padding-bottom:12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div:nth-child(n){padding:10px 8px;border-right:1px solid var(--ui-line);border-bottom:0}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div:last-child{border-right:0}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-stats>div>p:first-child{font-size:12px;white-space:nowrap}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save{flex-direction:row;align-items:center;justify-content:space-between;padding:10px 12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save button{width:auto;flex-shrink:0;font-size:12px;padding:8px 12px}
 .zhan-monitor:has(.platform-workbench-return) .zhan-subscription-save>span{font-size:12px}
}
