/* Screen-only workspace layout. Never target report pages or export canvases. */
@media screen {
  :root { --ui-space:24px; --ui-navy:#082f55; --ui-blue:#0866ac; --ui-border:#dce7ef; --ui-radius:14px; }
  .mf-nav { gap:24px; padding-block:16px; }
  .mf-nav nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; flex:1; max-width:650px; }
  .mf-nav nav a { text-align:center; padding:12px 8px; white-space:normal; line-height:1.5; border-radius:6px; }
  .mf-nav nav a[aria-current=page] { background:#edf5fb; color:var(--ui-blue); }
  .mf-home .mf-hero { max-width:1440px; grid-template-columns:repeat(2,minmax(0,1fr)); min-height:560px; }
  .mf-home .mf-hero-copy { padding:40px 32px; text-align:start; }
  .mf-home .mf-hero-wordmark h1 { font-size:clamp(54px,6vw,88px); }
  .mf-home .mf-hero-copy h2 { font-size:clamp(22px,2vw,30px); }
  .mf-home .mf-features { gap:16px; margin-block:24px; }
  .mf-home .mf-features>div { display:flex; flex-direction:column; align-items:center; padding:12px 4px; }
  .mf-home .mf-features h3 { min-height:42px; display:grid; align-items:center; }
  .mf-home .mf-features svg { flex-shrink:0; }
  .mf-home .mf-hero-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .mf-home .mf-hero-actions>* { padding:12px; gap:12px; text-align:center; }
  .mf-home .mf-tools { width:calc(100% - 48px); max-width:1392px; margin:24px auto 0; padding:24px; gap:24px; grid-template-columns:repeat(3,minmax(0,1fr)); box-shadow:none; }
  .mf-home .mf-tools-intro { grid-column:1/-1; padding:0 0 20px; border-bottom:1px solid var(--ui-border); }
  .mf-home .mf-tools>a { border:1px solid var(--ui-border); border-top:3px solid var(--ui-blue); border-radius:12px; padding:24px 18px; min-width:0; min-height:132px; gap:14px; align-items:center; }
  .mf-home .mf-tools>a>div { min-width:0; }
  .mf-home .mf-tools h2 { font-size:19px; line-height:1.6; }
  .mf-home .mf-tools p { line-height:1.8; }
  .mf-home .mf-footer { max-width:1440px; flex-wrap:wrap; }
  .mf-workspace>.topbar { min-height:120px; padding-block:24px; }
  .mf-workspace>.view-tabs { display:flex; flex-wrap:wrap; gap:8px; padding:16px 24px; max-width:1440px; margin:auto; }
  .mf-workspace>.view-tabs button { flex:1 1 160px; min-height:48px; padding:10px 14px; text-align:center; line-height:1.6; }
  .mf-workspace>.workspace { max-width:1440px; grid-template-columns:minmax(0,1fr) 272px; gap:24px; padding:0 24px; margin-block:24px 48px; }
  .mf-workspace .form-column { gap:24px; min-width:0; }
  .mf-workspace .form-card { padding:24px; border-radius:14px; box-shadow:0 3px 14px #082f5505; }
  .mf-workspace .section-heading { align-items:flex-start; padding-bottom:20px; margin-bottom:24px; gap:16px; }
  .mf-workspace .section-heading h2 { font-size:21px; line-height:1.5; }
  .mf-workspace .section-heading p { line-height:1.8; margin-top:6px; }
  .mf-workspace .fields-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; }
  .mf-workspace .fields-grid>.field { min-width:0; }
  .mf-workspace .fields-grid>.field>input { min-height:48px; }
  .mf-workspace .metrics-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .mf-workspace .metric-input { padding:20px; min-width:0; }
  .mf-workspace .project-pair-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; padding:20px; background:#f0f7fc; border:1px solid var(--ui-border); border-radius:12px; }
  .mf-workspace .project-pair-actions>div { grid-column:1/-1; }
  .mf-workspace .project-pair-actions p { margin-block:8px 0; line-height:1.8; }
  .mf-workspace .project-pair-actions>button { width:100%; min-height:48px; white-space:normal; line-height:1.6; }
  .mf-workspace .progress-card { padding:24px; border-radius:14px; }
  .mf-workspace .progress-card>button { width:100%; min-height:46px; white-space:normal; }
  .app>.shell { max-width:1440px; padding:24px; }
  #checklistWorkspace>.grid { grid-template-columns:216px minmax(0,1fr); gap:24px; }
  #checklistWorkspace .panel { padding:24px; border-radius:14px; }
  #checklistWorkspace .section-head { gap:16px; align-items:flex-start; margin-bottom:24px; padding-bottom:20px; }
  #checklistWorkspace .section-head h2 { font-size:22px; line-height:1.5; }
  #checklistWorkspace .section-head p { line-height:1.8; font-size:13px; }
  #checklistWorkspace .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
  #checklistWorkspace .field input,#checklistWorkspace .field select { min-height:48px; }
  #checklistWorkspace .kpis,#checklistWorkspace .completion-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  #checklistWorkspace .kpi { display:flex; flex-direction:column; justify-content:space-between; min-height:150px; padding:20px; }
  #checklistWorkspace .bi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  #checklistWorkspace .side .nav button { text-align:start; }
  #dashboardOverview .dashboard-hero { position:relative; overflow:hidden; min-height:160px; padding:28px 32px; margin-bottom:24px; border:1px solid var(--ui-border); border-radius:14px; background:#eff6fb; }
  #dashboardOverview .dashboard-hero:after { content:''; position:absolute; inset:0 72% 0 0; background:linear-gradient(90deg,transparent,#eff6fb),url('/mufattish/inspector.png') center 35%/cover; opacity:.3; pointer-events:none; }
  #dashboardOverview .dashboard-hero>div { position:relative; z-index:1; }
  #dashboardOverview .dashboard-hero h1 { font-size:28px; }
  #dashboardOverview .dashboard-hero p { max-width:650px; line-height:1.8; color:#4b667e; }
  #dashboardOverview .dashboard-toolbar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; padding:24px; border-radius:14px; }
  #dashboardOverview .dashboard-toolbar label { min-width:0; font-size:12px; }
  #dashboardOverview .dashboard-toolbar select,#dashboardOverview .dashboard-toolbar input,#dashboardOverview .dashboard-toolbar .btn { min-height:46px; width:100%; }
  #dashboardOverview .portfolio-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px; }
  #dashboardOverview .portfolio-kpi { padding:20px 16px; min-height:160px; min-width:0; align-items:flex-start; }
  #dashboardOverview .portfolio-kpi h2 { min-height:42px; font-size:13px; line-height:1.6; color:#466079; }
  #dashboardOverview .portfolio-kpi strong { font-size:32px; }
  #dashboardOverview .portfolio-charts { grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
  #dashboardOverview .portfolio-card { min-width:0; padding:24px; border-radius:14px; }
  #dashboardOverview .portfolio-card h2 { min-height:48px; margin-bottom:20px; line-height:1.7; }
  #dashboardOverview .distribution { flex-wrap:wrap; justify-content:center; gap:16px; }
  #dashboardOverview .distribution ul { min-width:0; }
  #dashboardOverview .recent-card { grid-column:1/-1; }
  @media(max-width:1100px){
    .mf-home .mf-features{grid-template-columns:repeat(2,minmax(0,1fr))}
    .mf-workspace>.workspace{grid-template-columns:minmax(0,1fr) 240px}
    #checklistWorkspace .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    #checklistWorkspace .bi-grid{grid-template-columns:1fr}
    #dashboardOverview .portfolio-charts{grid-template-columns:repeat(2,minmax(0,1fr))}
    #dashboardOverview .portfolio-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  }
  @media(max-width:800px){
    .mf-nav nav{flex-basis:100%;max-width:none;gap:8px}
    .mf-home .mf-hero{grid-template-columns:1fr;min-height:0}
    .mf-home .mf-hero-copy{padding:24px}
    .mf-home .mf-hero-visual{min-height:260px;border-radius:0}
    .mf-home .mf-tools{grid-template-columns:1fr;gap:16px;padding:20px}
    .mf-home .mf-tools>a{min-height:100px}
    .mf-workspace>.workspace,#checklistWorkspace>.grid{grid-template-columns:1fr}
    .mf-workspace .progress-card{position:static}
    #checklistWorkspace .side{position:static}
    #dashboardOverview .dashboard-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
    #dashboardOverview .portfolio-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
    #dashboardOverview .dashboard-hero{padding:24px}
  }
  @media(max-width:560px){
    .mf-home .mf-tools{width:calc(100% - 32px)}
    .mf-workspace>.workspace,.app>.shell{padding-inline:16px}
    .mf-workspace .form-card,#checklistWorkspace .panel{padding:18px}
    .mf-workspace .fields-grid,.mf-workspace .metrics-form-grid,.mf-workspace .project-pair-actions,#checklistWorkspace .form-grid,#checklistWorkspace .kpis,#checklistWorkspace .completion-cards,#dashboardOverview .portfolio-charts{grid-template-columns:1fr}
    #dashboardOverview .dashboard-toolbar{padding:16px}
    #dashboardOverview .portfolio-kpis{gap:12px}
    #dashboardOverview .portfolio-kpi{padding:16px 12px}
    #dashboardOverview .dashboard-hero h1{font-size:23px}
    .mf-home .mf-hero-actions{grid-template-columns:1fr}
  }
}
