/* Muse product-page shell shared by the team, preserved database, and CPM. */
:root {
  --portal-bg:#fff; --portal-surface:#fff; --portal-soft:#f1f4f7;
  --portal-text:#0a1317; --portal-muted:#5d6c7b; --portal-border:#dadde1;
  --portal-primary:#0457cb; --portal-primary-hover:#034aaf; --portal-primary-soft:#e8f1ff;
  --portal-on-primary:#fff; --portal-shell-height:96px;
}
:root[data-theme=dark] {
  --portal-bg:#0e171c; --portal-surface:#17232b; --portal-soft:#22313b;
  --portal-text:#f0f4f7; --portal-muted:#b2c0cd; --portal-border:#3a4a56;
  --portal-primary:#8fc1ff; --portal-primary-hover:#b1d3ff; --portal-primary-soft:#203e5c;
  --portal-on-primary:#071a2c;
}
.portal-shell,.portal-footer,.portal-database-nav { font-family:Inter,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif; font-size:14px; font-weight:400; line-height:1.5; color:var(--portal-text); }
.portal-shell *,.portal-footer *,.portal-database-nav * { box-sizing:border-box; }
.portal-shell { position:relative; z-index:80; background:var(--portal-bg); border-bottom:1px solid var(--portal-border); width:100%; }
.portal-shell-inner { min-height:95px; max-width:1536px; margin:auto; padding:11px clamp(20px,3vw,48px); display:flex; align-items:center; gap:24px; position:relative; }
.portal-shell a,.portal-footer a { text-decoration:none; }
.portal-shell .portal-brand { display:flex; gap:10px; flex-shrink:0; align-items:center; color:var(--portal-text); min-height:48px; }
.portal-brand-mark { display:block; flex:0 0 72px; height:72px; width:72px; background:transparent; border-radius:10px; }
/* Keep the supplied mark complete, including its DCPPP wordmark. */
.portal-brand-mark img { display:block; width:100%; height:100%; object-fit:contain; object-position:center; }
:root[data-theme=dark] .portal-brand-mark { background:#f5f7f4; }
.portal-menu { display:flex; align-items:center; justify-content:space-between; flex:1; gap:18px; min-width:0; }
.portal-menu[hidden],.portal-menu-toggle[hidden] { display:none!important; }
.portal-primary-nav { display:flex; align-items:center; justify-content:center; flex:1; gap:2px; }
.portal-shell .portal-nav-link { display:flex; align-items:center; justify-content:center; padding:10px 10px; min-height:44px; border-radius:999px; color:var(--portal-muted); white-space:nowrap; font-weight:600; font-size:14px; line-height:1.5; }
.portal-shell .portal-nav-link:hover,.portal-shell .portal-nav-link[aria-current=page] { background:var(--portal-soft); color:var(--portal-text); }
.portal-utilities { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.portal-shell .site-preferences { order:initial; margin:0; gap:6px; }
.portal-shell .site-preference { min-height:40px; background:var(--portal-soft); }
.portal-shell .site-preference select { font-family:inherit; font-size:12px; font-weight:600; padding-left:28px; padding-right:22px; min-height:40px; }
.portal-shell .site-preference-icon { left:9px; width:15px; height:15px; }
.portal-shell .portal-cloud-link { position:relative; flex:0 0 44px; width:44px; height:44px; border-radius:999px; display:flex; align-items:center; justify-content:center; color:var(--portal-muted); }
.portal-cloud-link>svg { position:absolute; width:22px; height:22px; }
.portal-cloud-engaged { opacity:0; }
.portal-cloud-link:hover,.portal-cloud-link:focus-visible { background:var(--portal-soft); color:var(--portal-primary); }
.portal-cloud-link:is(:hover,:focus-visible,:active) .portal-cloud-idle { opacity:0; }
.portal-cloud-link:is(:hover,:focus-visible,:active) .portal-cloud-engaged { opacity:1; }
.portal-cloud-label { position:absolute; right:0; top:calc(100% + 8px); min-width:max-content; padding:8px 12px; border-radius:12px; background:var(--portal-surface); color:var(--portal-text); box-shadow:0 8px 24px #0002; opacity:0; visibility:hidden; pointer-events:none; z-index:2; font-size:13px; font-weight:500; }
.portal-cloud-link:is(:hover,:focus-visible,:active) .portal-cloud-label { opacity:1; visibility:visible; }
.portal-shell .portal-menu-toggle { background:var(--portal-soft); color:var(--portal-text); display:flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; border:0; padding:10px 14px; gap:8px; border-radius:999px; cursor:pointer; font:inherit; font-weight:600; }
.portal-menu-toggle svg { width:22px; height:22px; }
.portal-menu-cross { display:none; }
.portal-menu-toggle[aria-expanded=true] .portal-menu-lines { display:none; }
.portal-menu-toggle[aria-expanded=true] .portal-menu-cross { display:block; }
.portal-shell :is(a,button,select):focus-visible,.portal-footer a:focus-visible,.portal-database-nav a:focus-visible { outline:2px solid var(--portal-primary); outline-offset:4px; }
.portal-footer { background:var(--portal-bg); border-top:1px solid var(--portal-border); }
.portal-footer-inner { max-width:1376px; padding:48px clamp(20px,3vw,48px) 24px; margin:auto; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; }
.portal-footer-brand strong { font-size:22px; font-weight:500; color:var(--portal-text); }
.portal-footer-brand p { margin:10px 0 0; color:var(--portal-muted); font-size:14px; }
.portal-footer-links { display:flex; gap:12px 24px; align-content:start; flex-wrap:wrap; max-width:390px; }
.portal-footer a { display:inline-flex; align-items:center; min-height:44px; color:var(--portal-muted); }
.portal-footer a:hover { color:var(--portal-primary); }
.portal-footer-bottom { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--portal-border); padding-top:20px; font-size:12px; color:var(--portal-muted); }
/* Only the additive adapter opts existing applications into these rules. */
.dreamcotton-database .portal-preserved-navigation[hidden],.dreamcotton-database .dc-catalogue-nav,.dreamcotton-database .newsEvents { display:none!important; }
.dreamcotton-database .portal-database-nav { background:var(--portal-bg); border-bottom:1px solid var(--portal-border); }
.portal-database-nav-inner { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; max-width:1376px; padding:12px clamp(20px,3vw,48px); margin:auto; }
.portal-database-label { color:var(--portal-text); font-size:13px; font-weight:600; }
.portal-database-links { display:flex; flex-wrap:wrap; gap:4px; }
.portal-database-nav .portal-database-link { display:inline-flex; align-items:center; min-height:40px; padding:8px 13px; color:var(--portal-muted); text-decoration:none; border-radius:999px; white-space:nowrap; font-size:13px; font-weight:600; }
.portal-database-nav .portal-database-link:hover,.portal-database-nav .portal-database-link[aria-current=page] { color:var(--portal-primary); background:var(--portal-primary-soft); }
.dreamcotton-cpm .portal-shell { position:sticky; top:0; }
.dreamcotton-cpm .sidebar { top:calc(var(--portal-shell-height) + 16px); }
.dreamcotton-cpm .auth-layout { min-height:calc(100dvh - var(--portal-shell-height)); padding-top:16px; }
.dreamcotton-cpm .auth-preferences { position:static; grid-column:1/-1; justify-content:flex-start; padding:0 32px; margin:0; }
.dreamcotton-cpm .auth-story { padding-top:16px; }
.dreamcotton-cpm #app .site-preferences { display:none!important; }
.dreamcotton-cpm .topbar { min-height:80px; padding-top:14px; padding-bottom:14px; }
.dreamcotton-cpm .shell.menu-open .mobile-overlay { top:var(--portal-shell-height); }
/* Local portal typography bridge: old bundles and application data stay intact. */
.dreamcotton-database #app,.dreamcotton-cpm #app { font-family:Inter,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif; font-weight:500; }
.dreamcotton-database #app :is(p,input,textarea,select,td,.dc-lead,.dc-intro-detail,.dc-metric-label,.dc-distribution-description,.dc-distribution-category,.dc-distribution-note,.dc-stat-description,.dc-stat-category,.dc-stat-footnote,.download_item .format,.el-pagination__total,.el-pagination__jump) { font-weight:500; }
.dreamcotton-database #app :is(h1,h2,h3,h4,strong,label,button,th,.dc-eyebrow,.dc-statistics-eyebrow,.dc-metric-value,.dc-distribution-value,.dc-stat-value,.dc-button,.dc-text-link,.icon_text,.el-form-item__label,.el-checkbox__label,.el-radio__label,.download_item .name,.detail_btn,.upload_btn,.submit_btn) { font-weight:600; }
.dreamcotton-database #app .content_title { font-weight:600!important; }
.dreamcotton-database #app .crop .content_flex { font-weight:500!important; }
.dreamcotton-database #app .dc-metric-arrow { display:none; }
.dreamcotton-database :is(.el-dialog,.el-select-dropdown,.el-message-box,.el-picker-panel,.el-message) { font-family:Inter,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif; font-weight:500; }
.dreamcotton-database :is(.el-dialog__title,.el-message-box__title,.el-select-dropdown__item.selected) { font-weight:600; }
.dreamcotton-cpm #app :is(p,input,textarea,select,td,small,.hint,.muted,.small,.brand small,.auth-foot,.auth-points span,.auth-model span,.breadcrumb,.top-note,.stat-caption,.task-sub,.metric span,.chart-label,.chart-title,.poll-note,.message-body,.chat-note,.footer-note,.provider-current,.provider-expand,.provider-modes small,.upload-label span,.user-role,.kv) { font-weight:500; }
.dreamcotton-cpm #app :is(h1,h2,h3,h4,strong,label,legend,button,th,.button,.eyebrow,.nav-heading,.nav-link,.nav-label,.stat-label,.stat-value,.step-label,.step-number,.task-title,.badge,.artifact-link,.upload-label,.inline-checkbox,.provider-meta strong,.provider-identity strong) { font-weight:600; }
@media(min-width:1200px) and (max-width:1360px) {
  .portal-shell-inner { gap:14px; padding-inline:24px; }
  .portal-menu { gap:12px; }
  .portal-shell .portal-nav-link { padding-inline:8px; font-size:13px; }
}
@media(max-width:1199px) {
  .portal-shell-inner { justify-content:space-between; }
  .portal-menu { position:absolute; top:calc(100% - 1px); left:20px; right:20px; z-index:90; display:flex; flex-direction:column; align-items:stretch; gap:20px; padding:20px; border:1px solid var(--portal-border); border-radius:20px; background:var(--portal-surface); box-shadow:0 12px 30px #0002; max-height:calc(100dvh - var(--portal-shell-height) - 24px); overflow-y:auto; }
  .portal-primary-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .portal-shell .portal-nav-link { white-space:normal; text-align:center; min-height:48px; padding:12px; font-size:15px; }
  .portal-utilities { justify-content:flex-end; border-top:1px solid var(--portal-border); padding-top:16px; }
  .portal-shell .portal-cloud-link { margin-right:auto; width:auto; flex-basis:auto; min-width:100px; gap:8px; padding:0 8px; }
  .portal-cloud-link>svg { position:static; }
  .portal-cloud-link .portal-cloud-engaged { position:absolute; left:8px; }
  .portal-cloud-label { position:static; opacity:1; visibility:visible; padding:0; background:transparent; box-shadow:none; font-size:13px; }
}
@media(max-width:640px) {
  .portal-shell-inner { padding:11px 16px; gap:8px; }
  .portal-shell .portal-menu-toggle { padding-inline:10px; gap:6px; }
  .portal-menu { padding:16px; left:12px; right:12px; }
  .portal-primary-nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .portal-shell .portal-nav-link { font-size:14px; }
  .portal-utilities { flex-wrap:wrap; gap:10px; }
  .portal-shell .site-preferences { margin-left:auto; }
  .portal-shell .portal-cloud-link { flex-basis:100%; justify-content:flex-start; }
  .portal-footer-inner { grid-template-columns:1fr; padding-top:32px; gap:20px; }
  .portal-footer-bottom { flex-wrap:wrap; justify-content:flex-start; gap:4px 16px; }
  .portal-database-nav-inner { gap:6px; padding:10px 16px; }
  .portal-database-label { width:100%; font-size:12px; }
  .portal-database-links { gap:2px; }
  .portal-database-nav .portal-database-link { padding-inline:10px; font-size:12px; }
  .dreamcotton-cpm .auth-preferences { padding:0 24px; }
}
@media(prefers-reduced-motion:reduce) { .portal-shell *, .portal-footer * { scroll-behavior:auto; transition:none!important; animation:none!important; } }
@media print { .portal-shell,.portal-database-nav,.portal-footer { display:none; } }
